Lattice pattern projector using liquid crystal lattice

ABSTRACT

A lattice pattern projector for measuring a three-dimensional shape with enhanced accuracy while shortening the measuring time using a lattice pattern projection method, characterized by comprising a light source section ( 101 ), a liquid crystal lattice ( 111 ), a section ( 102 ) for projecting a lattice pattern, formed by passing the outgoing light from the light source section through the liquid crystal lattice, to an object for measurement, a section ( 112 ) for driving the liquid crystal lattice such that a linear intensity distribution is present in one period of the lattice pattern, a section ( 104 ) for detecting the lattice pattern projected to the object for measurement and deformed, and an operating section ( 114 ) for converting the linear intensity distribution in each period of the deformed lattice pattern into a linear phase distribution having a phase varying linearly.

FIELD OF THE INVENTION

[0001] The present invention relates to a structure and method forprocessing images and for preparing a grating pattern for a threedimensional shape measuring device using a grating pattern projectionmethod.

BACKGROUND OF THE INVENTION

[0002] In recent years, in many fields such as industry, medicine andfashion, the requirements for three dimensional shape measurement haveincreased, in particular with the desire for non-contact measurementdevices using optical means. Laser interferometers are widely used inthe case of areas whose surface irregularities are in the order ofmicrometers (μm). However, for areas whose irregularities are 100 μm ormore, another measuring means is required in place of the laserinterferometer. Typical shape measuring methods in this case are alight-section method of scanning a slit shaped laser beam above thesurface of an object, a moirê pattern measuring method, a gratingpattern projection method, and the like. Among these, the gratingpattern projection method has many advantages such as simple measurementprocessing, a simple device structure, high measurement precision, andthe like, and is therefore suitable for three dimensional shapemeasurement.

[0003]FIG. 24 and FIG. 25 show the principle of three dimensional shapemeasurement using a grating pattern projection method. FIG. 24 is anexample of the principle structure of a grating pattern projectiondevice. A light source section 401 is constructed from a white lightsource and the like for lighting, such as a halogen lamp or the like,and illuminates a grating 411. In the grating 411, a plurality of lineargrating patterns are formed having a predetermined pitch andpredetermined transmitted light intensity distribution. The gratingpattern of the grating 411 is enlarged or reduced by a projection lens402 and projected onto an object 400 whose three dimensional shape is tobe measured. The projected grating pattern is deformed (curved)according to the degree of irregularities of the object 400. Where theirregularities are small, deformation of the projected grating patternis small, and where the irregularities are large, deformation of theprojected grating pattern is large. Also, because the direction in whichthe grating pattern is distorted according to the direction of theirregularities is opposite thereto, the direction of the irregularitiesin the object 400 can be distinguished from the distortion direction ofthe grating pattern.

[0004] The two dimensional image of the grating pattern (hereafterreferred to as ‘distorted grating pattern’) distorted according to theirregularities of the object 400 is detected by an image detectingsection 404 comprising a CCD camera or the like via an image pickup lens403 from a direction different to the projected direction. A dataprocessing section 414 image processes the two dimensional image of thedeformed grating pattern detected by the image detecting section 404 andarithmetically processes fluctuations in the intensity distributionthereof to calculate the three dimensional shape of the object 400.

[0005] When the two dimensional image of the deformed grating pattern isimage processed to calculate the three dimensional shape of the object400, a triangulation method determined by the distances and angles ofthe triangular shape between the grating 411, the object 400 and theimage detecting section 404. FIG. 25 shows the principle of thetriangulation method. In the triangular shape formed by the three axesof the projection light axis 420, monitor light axis 422 and base lineaxis 424, if the height of the position 426 of the object 400 is changedby Δh, the monitor light axis 422 moves in parallel to the broken line423 and detected position in the detection plane 427 shifts by ΔX. Inother words, the height difference Ah appears as the positionaldifference ΔX in the plane of the two dimensional image. Consequently,irregularity information of the object 400 can be calculated fromfluctuations in the intensity distribution of the deformed gratingpattern image. The intensity distribution at each of the pixel positionsp (x,y) in the image detecting section 404 is converted to a threedimensional coordinate P (X,Y,Z) by the calculations of thetriangulation method determined by the base line length L, angles θ andφ of the triangular shape.

[0006] When image processing of the deformed grating pattern isperformed by the grating pattern projection device having the abovestructure, not only the Z coordinate of the coordinates P (X,Y,Z) of theobject 400, but the X-Y coordinates of the coordinates P of the object400 must be measured with high in-plane resolution. For that reason, itis necessary to set a specified intensity distribution with a gradientin the light intensity distribution such that a position of theprojected grating pattern within one cycle can be finely distinguished.Further, since fluctuations in the intensity distribution of thedeformed grating pattern image are not only affected by irregularitiesin the object 400 but are also affected by surface reflections on theobject 400, it is necessary to detect intensity fluctuations due toirregularities only, without them being influenced by surfacereflections.

[0007] In conventional grating pattern projection devices, as shown inthe waveform in FIG. 26(a), the light intensity distribution for theinterval P of each cycle of the grating pattern is set as a sine wave.Where a sine wave intensity distribution grating pattern is projectedonto the surface of an object, the intensity distribution I(x) of thegrating pattern at a position x on the object is as shown in formula(1).

I(x)=B(x)+A(x) cos [φ(x)+α]  (1)

[0008] Where B(x) is bias intensity, A(x) is amplitude, and a is aninitial phase. The sine wave intensity distribution grating patterndetects the phase φ(x) of each position from the intensity I(x).However, because the intensity I(x) fluctuates due to surfacereflections, those surface reflections cannot be detected by a singlegrating pattern alone. Therefore, a plurality of grating patterns,having the same sine wave intensity distribution and with only theirinitial phases α changed, are projected in sequence onto the object 400,the plurality of deformed grating pattern images are detected, and theintensity distributions of the plurality of images are processed tomeasure the three dimensional shape. This method is called a phase shiftmethod.

[0009] The waveforms 432, 433, 434 and 435 of the plurality of sinewaves having different initial phases are shown in FIG. 26(b). The phaseshift method will be explained using FIG. 26(b). The phase shift methodof this example changes the initial phases α to 0, π/2, π, and 3π/2. Ifthe intensities at the positions x of the deformed grating patterns,when the sine wave intensity distribution grating patterns of waveforms432 to 435 are projected, are given as I0, I1, I2 and I3, their phasesφ(x) are calculated by formula (2).

φ(x)=arctan[(I 3 −I 1)/(I 0−I 2)]  (2)

[0010] As the phase φ(x) within one cycle of a grating pattern is avalue within the range of 0 to 2π, the three dimensional shape ismeasured from the optical arrangement shown in FIG. 24 by connecting thephases of each grating pattern in sequence.

[0011] In formula (2), the bias intensity B(x) and amplitude A(x) havebeen omitted. In other words, by using the phase shift method, theinfluence of surface reflections is not received and phases due purelyto irregularities can be detected. Although the above is an examplewhere the initial phase α of the grating pattern is changed in steps ofπ/2, a method of dividing one cycle of the grating pattern into threeand shifting the initial phase a in steps of 2α/3 to detect threedeformed grating pattern images can also be used.

[0012] Next, a conventional method of preparing a grating pattern willbe shown. In an initial grating pattern projector, a grating pattern isprepared by drawing it directly on a glass substrate or film. As thedeformation of the deformed grating pattern image is determineddepending on the irregularities of the object 400, it is necessary forthe grating pitch to be changeable in accordance with irregularities, sothat the grating pitch is greater when the irregularities are larger,and less when the irregularities are smaller. Since the grating pitchand intensity distribution are fixed if the grating is drawn on a glasssubstrate, a number of types of grating with different grating pitchesare prepared and these gratings are selected and used according to theirregularities of the object to be measured. When the phase shift methodis used, the grating 411 is moved at a fixed pitch using a mechanizedstage or the like.

[0013] Recently, sine wave intensity distribution grating patterns havebeen prepared using liquid crystal elements. Liquid crystals areelements whose transmitted light intensities change in accordance with adriving voltage, and can provide a grating pattern having adjustablegrating pitch and intensity distribution by means of voltage control. Anexample of the electrode structure of a conventional liquid crystalgrating is shown in FIG. 27. The electrodes 441 have a structure whereina plurality of separated independent pixels are formed in a matrix shapehaving m number of row electrodes C1, C2, . . . Cm and n number ofcolumn electrodes R1, R2, . . . Rn. In the matrix shaped electrodestructure, a signal comprising multiple voltage levels is applied to therow electrodes and column electrodes to perform time division driving.

[0014] In FIG. 28(a), transmitted light intensity characteristics withrespect to the driving voltages of the liquid crystal elements areshown. The transmitted light intensity of liquid crystals changesaccording to the driving voltage, and has the characteristic thatalthough the transmitted light intensity changes substantially inproportion to the driving voltage when the driving voltage is low, andthe transmitted light intensity saturates when the driving voltage isincreased. Given this, voltages corresponding to the light intensity of,for example, 452 at point A, 453 at point B, and 454 at point C, areapplied to the liquid crystals, according to a set sine wave intensitydistribution.

[0015] An example of sine wave intensity distribution is shown in FIG.28(b). As the pixels of the liquid crystal grating are separated, it isa discrete intensity distribution in the horizontal and verticaldirections due to the gaps of the liquid crystal grating. Also, it is adiscrete intensity distribution to the extent that the number ofgradients is low (the driving voltage step width is wide). Thetransmitted light intensities of each of point A, point B, and point Cwhen driven at the voltages shown in FIG. 28(a) are 462, 463, and 464 inFIG. 28(b). In this way, voltages that become sine wave intensitydistributions are set according to the voltage—transmitted lightintensity characteristic of liquid crystal. Since liquid crystalgratings have discrete intensity distribution, in making the gradationof the sine wave high to make a smooth intensity distribution, thedriving voltage width is set narrow. When using liquid crystal the phaseshift method is realized by electrical control.

[0016] In a conventional grating pattern projector, it is necessary tomake the intensity distribution of the grating pattern a sine wave. Whenmaking a sine wave intensity distribution grating pattern with liquidcrystal, in order to approximate an ideal sine wave distribution, it isnecessary to increase the gray level (intermediate tone intensity)gradation (normally 32 gradations or more). However, due to thenon-linearity of the voltage—transmitted light intensity characteristicof liquid crystal shown in FIG. 28(a), creation of sine wavedistribution with high gradation is difficult. In particular, becausethe change of intensity of the transmitted light with respect to theapplied voltage decreases toward the maximum intensity and minimumintensity of the sine wave, the sine wave in these areas becomesdistorted. Since arithmetically processing the distortion of the sinewave to correct it to an ideal sine wave is difficult, phase calculationprecision is reduced by the distortion of the sine wave and threedimensional shape measurement errors increase.

[0017] Also, when detecting phase distribution of the deformed gratingpattern image of the sine wave intensity distribution, the value of thesine wave intensity must be detected with high precision. Even when anideal sine wave intensity distribution has been produced, as the changein the intensity of the sine wave is small in the proximity of the peakthereof, it is difficult to precisely detect the intensity in that area.As a result, when using the phase shift method, phase calculation errorsoccur due to intensity detection errors when calculating phases fromformula (2), and three dimensional shape measurement errors increase.Moreover, in the case of grating patterns having low gradient sine waveintensity distribution, in-plane resolution of the deformed gratingpattern decreases, therefore the in-plane resolution of the threedimensional measurement decreases.

[0018] Further, when using the conventional phase shift method by meansof sine wave intensity distribution, the intensity distribution of thegrating pattern is a sine wave, it is necessary to shift the initialphase of the sine wave by π/2 each time and project four times. As thegrating pattern is projected four times, there is the problem of theincrease in measurement time. when realizing sine wave intensitydistribution by means of a liquid crystal grating, because thetransmitted light intensity characteristic of the liquid crystalelements is non-linear, there is the problem that the change inintensity with respect to the change in voltage towards the peakintensity area is small compared to the intermediate intensity area ofthe sine wave, and the sine wave is distorted towards the peakintensity. Also, with regard to the drive signal generating the sinewave, the higher the gradation, the more complex a drive signal isrequired, therefore there is the problem that increasing the gradationof the sine wave is difficult.

[0019] Further, due to the sine wave distortion, phase errors occur whenconverting the intensity distribution p (x,y) to phase distributionφ(x,y), so there is the problem that three dimensional shape measurementerrors become large. Also, there is the problem that, becausetrigonometric function processing is needed when converting sine waveintensities to phases, intensity data of obtained two dimensional imagesare standardization processed, a trigonometric table must be referred tofor arctan values, and the like, the image data processing structure iscomplicated. Further, there is the problem that, because sine waveintensity distribution is non-linear, when calculating phases, phasecalculation is necessary for each position on the image, leading to along processing time.

[0020] Moreover, although determining the extent of distortion andcorrecting the sine wave distribution is permissible when the intensitydistribution of the sine wave is distorted, determining the sinecharacteristic is difficult because the sine wave is non-linear. Also,even if the distortion of the sine wave can be determined, whencorrecting the intensity distribution by changing the effective voltage,the effective voltage must be changed in small steps. As a result, inactuality, the sine wave intensity distribution cannot be corrected andperforming precise three dimensional shape measurement is difficult.

[0021] Further, the electrode structure of conventional liquid crystalgratings is a matrix shape wherein individual pixels are separated. Thematrix shape has gaps between adjacent pixels, its effective pixelsurface area is reduced (aperture rate is reduced) and its light usageefficiency is decreased. Also, the discontinuity of its intensitydistribution is high because the gaps between the pixels are large, andoptical noise occurs in the grating pattern. Furthermore, sine waveintensity detection errors increase due to the optical noise. As thematrix shape is time division driven, a complex drive signal havingmultiple potential levels is necessary. Moreover, as the liquid crystalelements are such that changes in the transmitted light intensity arenon-linear with respect to changes in the drive voltage, setting thetransmitted light distribution of the liquid crystals by means of thetime division drive signal so as to have a sine wave intensitydistribution is difficult.

[0022] Therefore, an object of the present invention is to provide athree dimensional shape measuring device using a liquid crystal grating,for solving the above problems which occur due to using a gratingpattern having a sine wave intensity distribution.

[0023] Another object of the present invention is to provide a threedimensional shape measuring device with high measuring precision thatprepares a grating pattern whose intensity distribution changes to alinear form, using a liquid crystal grating.

[0024] A further object of the present invention is to provide a threedimensional shape measuring device with high measuring precision, thatdetects phase distribution that changes to linear from only one phaseimage signal without performing phase shifting, whose grating patternpreparation is simple, and whose measuring time is short.

[0025] Still another object of the present invention is to provide athree dimensional shape measuring device with high measuring precisionwhose grating pattern preparation is simple and whose measuring time isshort, by determining the non-linear characteristic of intensitydistribution to correct it to a linear intensity distribution.

SUMMARY OF THE INVENTION

[0026] To attain the above objects, the grating pattern projectionapparatus of claim 1 of the present invention comprises a light sourceportion, a liquid crystal grating, a projector for projecting a gratingpattern formed by light emitted from the light source passing throughthe liquid crystal grating onto an object to be measured, a liquidcrystal driver for driving th liquid crystal grating so that one cycleof the grating pattern has a linear intensity distribution, a detectorfor detecting a deformed grating pattern distorted by projecting thegrating pattern onto an object to be measured, and a processor forconverting the linear intensity distribution of each cycle of thedeformed grating pattern into a linear phase distribution for changing aphase linearly.

[0027] Also, the liquid crystal driver preferably sets the pitch of thegrating pattern in accordance with surface irregularities of the objectto be measured.

[0028] Further, the liquid crystal driver preferably prepares atriangular wave intensity distribution such that a width of an areawhose intensity increases linearly and a width of an area whoseintensity decreases linearly are equal in one cycle of the gratingpattern, and drives the liquid crystal grating so that the gratingpattern has a triangular wave intensity distribution.

[0029] Further, the processor preferably detects a maximum intensity ora minimum intensity of each cycle of the deformed grating pattern,converts the intensity at each position of the deformed grating patterninto a standardized intensity with the maximum intensity or the minimumintensity as a standard, and performs. proportional processing of thestandardized intensity to convert an intensity that changes linearly inone cycle of the deformed grating pattern into a phase that changeslinearly between 0 and 2π.

[0030] Further, the processor preferably comprises a smoothing processorfor converting the intensity of the deformed grating pattern into anintensity distribution that changes smoothly, and a linear distributioncorrector for correcting intensity changes in each intensity increasearea and intensity decrease area of the smoothing processed deformedgrating pattern into an intensity distribution that approximates astraight line, so that it changes linearly.

[0031] Further, it is preferable that the grating pattern includes afirst grating pattern and a second grating pattern of the same gratingpitch and whose intensity distributions are mutually inverse, theprojector sequentially projects the first grating pattern and the secondgrating pattern individually onto an object to be measured, the detectorsequentially detects a first deformed grating pattern caused by thefirst grating pattern and a second deformed grating pattern caused bythe second grating pattern, and

[0032] the processor determines whether there is a fluctuation in thereflection state of an object to be measured by detecting changes in themaximum intensity and minimum intensity of each cycle of the first andsecond deformed grating patterns, and either one of positions where anintensity of the first and second deformed grating patterns changediscontinuously, or positions where the intensity sum of each positionof the first and second deformed grating patterns changesdiscontinuously, and converts the linear intensity distributions of thefirst and second deformed grating patterns to linear phase distributionswhen the processor determines that the reflection state does notfluctuate, and

[0033] when the processor determines that the reflection state doesfluctuate, the processor converts the intensity distributions within arange where the reflection state fluctuates in the linear intensitydistributions of the first and second deformed grating patterns to afirst linear phase distribution for changing a phases linearly, convertsthe intensity distributions within a range where the reflection statedoes not fluctuate in the linear intensity distributions of the firstand second deformed grating patterns to a second linear phasedistribution for changing a phases linearly, and obtains the linearphase distribution by smoothly connecting the first and second phasedistributions at positions where the intensity distributions of thefirst and second deformed grating patterns change discontinuously orpositions where the intensity sum of the first and second deformedgrating patterns changes discontinuously.

[0034] Further, the processor preferably converts the intensitydistributions of the first and second deformed grating patterns intointensity distributions that change smoothly, and corrects therespective intensity distributions of the smoothing processed first andsecond deformed grating patterns to intensity distributions wherein theintensity changes of intensity increase areas and intensity decreaseareas approximate straight lines so that they change linearly.

[0035] Further, it is preferable that the grating pattern includes afirst grating pattern and a second grating pattern of the same gratingpitch and whose intensity distributions are mutually inverse, theprojector projects any one of the first grating pattern or the secondgrating pattern onto an object to be measured when the surface of anobject to be measured is formed from a material of uniform reflectivity,and sequentially projects the first and second grating patterns onto anobject to be measured when the surface of an object to be measured isformed from a material of a plurality of reflectivities, and thedetector sequentially detects a first deformed grating pattern caused bythe first grating pattern and a second deformed grating pattern causedby the second grating pattern.

[0036] Further, it is preferable that the liquid crystal grating has aplurality of liquid crystal elements formed in the liquid crystalgrating, a single common electrode provided on one side of the pluralityof liquid crystal elements, and a stripe electrode having a plurality ofstripe shape electrodes and formed in a discrete arrangement providedopposite the common electrode and the liquid crystal driver applies arectangular wave signal having the same duty ratio at the same twointensities to the common electrode and the stripe electrodes, changesthe phases of the rectangular wave signal applied to the commonelectrode and the rectangular signal applied to the stripe electrodeaccording to the linear intensity distribution, prepares the gratingpattern having a linear intensity distribution in every cycle.

[0037] Further, it is preferable that the grating pattern is a patternof one phase only, the projector projects a single phase grating patternonto an object to be measured one time only, the detector detects asingle phase deformed grating pattern caused by the single phase gratingpattern one time only, and the processor has a single phase signalintensity fluctuation detector for detecting a peak intensity of eachcycle of the single phase grating pattern, the peak intensity position,and the rate of intensity change, and a phase distribution calculatorfor converting the single phase deformed grating pattern to a linearphase distribution according to fluctuation of the peak intensity andrate of intensity change.

[0038] Further, the liquid crystal driver preferably drives the liquidcrystal grating so that the grating pattern has a triangular waveintensity distribution, by preparing a triangular wave intensitydistribution wherein, in one cycle of the grating pattern, the width ofan area whose intensity increases linearly and the width of an areawhose intensity decreases linearly are equal.

[0039] Further, the liquid crystal driver preferably drives the liquidcrystal grating by means of a signal whose voltage in one cycle is adiscrete stepped shape and changes symmetrically every half cycle,according to the number of gradations representing the fineness ofintensity changes of linear intensity distribution.

[0040] Further, the single phase signal intensity fluctuation detectorpreferably, when the peak intensity in each cycle of the single phasedeformed grating pattern is constant, obtains a linear phasedistribution from a rate of intensity change where th reflectivity of anobject to be measured is determined to be constant and, when the peakintensity fluctuates, obtains a linear phase distribution from a peakintensity and rate of intensity change where the reflectivity of anobject to be measured is determined to be fluctuating in the vicinity ofpositions where the peak intensity fluctuates.

[0041] Further, the single phase signal intensity fluctuation detectorpreferably detects a rate of intensity change from a difference value ofa pixel intensity of a previously set step pixel interval in one cycleof the single phase deformed grating pattern, sets a slice intensitylevel for separating the rate of intensity change into discrete segmentswhen the rate of intensity change in one cycle fluctuates, compares theslice intensity level and rate of intensity change to sort the rate ofintensity change into areas according to. the slice intensity level, anddetects the boundary positions of the areas.

[0042] Further, it is preferable that a linear phase distributioncalculator, when the rate of intensity change in one cycle of the singlephase deformed grating pattern is detected as constant by the singlephase signal intensity fluctuation detection portion, standardizes aphase difference between maximum intensities or minimum intensities inone cycle of the single phase deformed grating pattern to 2π, andconverts each pixel position from a proportional relationship between astandard pixel number between maximum intensities or minimum intensitiesand each pixel position in one cycle to a phase from 0 to 2π, to obtaina linear phase distribution that changes linearly at a constant gradientin one cycle.

[0043] Moreover, it is preferable that the linear phase distributioncalculator, when the rate of intensity change in one cycle of a singlephase deformed grating pattern is detected as fluctuating by the singlephase signal intensity fluctuation detector, standardizes a phasedifference between maximum intensities or minimum intensities in onecycle of the single phase deformed grating pattern to 2π, converts eachpixel position within an area according to a proportional relationshipbetween a standard pixel number between maximum intensities or minimumintensities and each pixel position within the area, as well as a sliceintensity level of the area, to a phase from 0 to 2π, and connectsphases of each area at boundary positions of each area, to obtain alinear phase distribution that changes linearly at a constant gradientin one cycle.

[0044] Furthermore, it is preferable that the liquid crystal driverdrives the liquid crystal grating by means of a preliminary linearintensity distribution signal, the projector projects a preliminarygrating pattern onto an object to be measured according to thepreliminary linear intensity distribution signal, the detector detects apreliminary deformed grating pattern distorted by projecting thepreliminary grating pattern onto an object to be measured, and theliquid crystal driver has an intensity distribution judgment unit fordetecting a non-linear characteristic of the preliminary deformedgrating pattern and positions having a non-linear characteristic, and alinear distribution signal corrector for, when a non-linearcharacteristic of the preliminary deformed grating pattern is detected,correcting the preliminary linear intensity distribution signal so thatthe preliminary deformed grating pattern does not have a non-linearcharacteristic, and the liquid crystal driver uses a correctedpreliminary linear intensity distribution signal to drive the liquidcrystal grating for measuring.

[0045] Further still, it is preferable that the intensity distributionjudgment unit detects a difference intensity between previously set steppixels with respect to one image area of the preliminary deformedgrating pattern and, determines that preliminary deformed gratingpattern does not have a non-linear characteristic in a case where anabsolute value of a difference intensity in one cycle of the preliminarydeformed grating pattern is regarded as substantially constant,determines that the preliminary deformed grating pattern does not have anon-linear characteristic in a case where the absolute value of adifference intensity in one cycle of the preliminary deformed gratingpattern fluctuates over a previously set limit, determines that thepreliminary deformed grating pattern has a non-linear characteristic ina case where a difference intensity close to 0 occurs in the vicinitywhere the difference intensity in one cycle of the preliminary deformedgrating pattern changes from a maximum value to a minimum value,determines that a nonlinear characteristic has occurred in the vicinityof the maximum intensity of the preliminary deformed grating pattern ina case and where a difference intensity close to 0 occurs in thevicinity where the difference intensity in one cycle of the preliminarydeformed grating pattern changes from a minimum value to a maximumvalue, and determines that a nonlinear characteristic has occurred inthe vicinity of the minimum intensity of the preliminary deformedgrating pattern in a case where a difference intensity close to 0 occursin the vicinity where the difference intensity in one cycle of thepreliminary deformed grating pattern changes from a maximum value to aminimum value.

[0046] Yet further, it is preferable that the linear distribution signalcorrector, according to the extent of a non-linear characteristic of apreliminary deformed grating pattern determined by the intensitydistribution judgment unit and positions where the non-linearcharacteristic occurs, changes the voltage level of the preliminarylinear intensity distribution signal and phases between signals tocontrol a drive effective voltage of the liquid crystal grating,performs control to reduce the drive effective voltage of the liquidcrystal grating where a non-linear characteristic is determined by theintensity distribution judgment unit to have occurred in a maximumintensity area of the preliminary deformed grating pattern, and performscontrol to increase the drive effective voltage where a non-linearcharacteristic is determined by the intensity distribution judgment unitto have occurred in a minimum intensity area of the preliminary deformedgrating pattern.

[0047] Yet further still, it is preferable that the linear distributionsignal corrector, according to the extent of a non-linear characteristicof a preliminary deformed grating pattern determined by the intensitydistribution judgment portion and positions where the non-linearcharacteristic occurs, changes the number of gradations of thepreliminary linear intensity distribution signal and phases betweensignals to control a drive effective voltage of the liquid crystalgrating, and reduces the number of gradations where a non-linearcharacteristic is determined by the intensity distribution judgmentportion to have occurred in a maximum intensity area of the preliminarydeformed grating pattern.

EFFECTS OF THE INVENTION

[0048] The grating pattern projection apparatus according to the presentinvention has an intensity distribution, pattern and pitch that arefreely changeable, by use of a liquid crystal grating. Also, by makingthe intensity distribution linear, it can be converted to phasedistribution by a simple comparison process. Further, if the intensitydistribution of a grating pattern distorted to a non-linear shape due tonoise is subjected to an arithmetic processing operation for convertingit into a linear intensity distribution, a phase distribution from whichthe effect of the noise has been removed can be detected, improving theprecision of three-dimensional shape measurement. Further still, if itapproaches a straight line, increasing the linear intensity gradation ofthe grating pattern becomes unnecessary, and control of the gratingpattern becomes easier.

[0049] Also, projection of a grating pattern in response to the surfacereflection state of the object can be selected. Where the surfacereflection state is constant, the grating pattern need only be projectedonce. If the surface reflection state fluctuates, the grating patternneed only be projected twice with the intensity distribution inverted ineach case. By reducing the number of grating patterns projected, themeasurement time is shortened.

[0050] In addition, where the surface reflection state fluctuates,boundary positions where the surface reflection state changes can beeasily determined from the intensity fluctuations in the deformedgrating pattern obtained by the two projections. As a result, the effectof intensity fluctuations due to fluctuations in the surface reflectionstate can be removed, a phase distribution according to irregularitiescan be detected with precision, and a three dimensional shape can bemeasured faster and with more precision than with a sine wave intensityphase shift of the prior art.

[0051] Moreover, by using a stripe shaped electrode structure, a staticdrive can be applied, and any light intensity distribution can easily berealized with a simple drive signal, by a pulse width modulation methodusing two signal levels. Also, the aperture rate of the pixels can beimproved and grating patterns with little noise can be projected. As aresult, a grating pattern having a shape that matches the irregularshape of the object can be projected onto the object, and measurementprecision and reliability can be improved. In addition, as the processfrom preparation of the grating pattern to two dimensional imageprocessing is done by computer processing, completely automaticmeasurement in real time is possible.

[0052] Further, the grating pattern projection apparatus according tothe present invention projects a grating pattern having a linearintensity distribution using a liquid crystal grating. By using a liquidcrystal grating, the intensity distribution and pattern pitch of thegrating pattern can be freely changed. At this time, the intensitydistribution of the grating pattern is set at a linear distributionhaving a symmetrical triangular waveform. By making the intensitydistribution linear, even if it is a distribution of as low as eightgradations, a grating pattern of the same high surface density as thathaving a high number of gradations can be prepared, improvingmeasurement resolution. Also, as it can be performed with low gradation,preparation of the single phase signal for driving the liquid crystalgrating is easier.

[0053] Furthermore, the number of times the grating pattern is projectedis only once, and the deformed grating pattern image is detected onlyonce. As once only grating pattern projection and image detection isacceptable, the measurement time until image detection is shortened, andhigh speed measurement, four times faster or more compared to prior artsine wave grating projection, is possible. Also, as it is acceptable toimage process a single phase image signal, the processing time isgreatly shortened.

[0054] Also, when detecting a deformed grating pattern image of a singlephase and processing a single phase image signal, in particular, boththe peak intensity and change of intensity rate of each cycle in thesingle phase image signal are detected and the phase distribution iscalculated according to fluctuations therein. By detecting the two setsof intensity data in combination, fluctuations in the reflection stateand irregularity fluctuations of the object can be distinguished,improving measurement reliability. Also, since the basic intensitydistribution of the single phase image signal is linear, the abovedetection can be performed between discrete step pixels, and theprocessing time shortened.

[0055] Further, by separating the rate of intensity change into discretesegments, the effect of minute intensity fluctuations that become noiseis removed, and a phase distribution that changes to linear, by gradingit according to the segmented rate of intensity change in each area, iscalculated. A linear phase distribution is obtained from a simpleproportional relationship of the number of pixels in each area to thestandard number of pixels in one cycle, therefore phase calculationprocessing is easy. This also results from the standard intensitydistribution of the single phase signal being linear.

[0056] Also, as the grating pattern projection apparatus according tothe present invention projects the grating pattern having a linearintensity distribution using a liquid crystal grating, if the intensitydistribution of a preliminarily projected grating pattern is anon-linear distribution, it is corrected to a linear intensitydistribution. The pixels of the liquid crystal grating are set in stripeshapes and a drive signal that sets a linear intensity distribution bymeans of a static drive is prepared. As the drive signal can be of adual value intensity level, and only the phases between drive signalsneed to be changed, preparation of the drive signal is simple. Also, ifthe intensity distribution is set to linear, there need only be a smallnumber of intensity gradations. Even if it is an intensity distributionwith a number of gradations as low as eight, a grating pattern of thesame high surface resolution as that having a high number of gradationscan be prepared, and measurement resolution can be improved.

[0057] Further, with respect to determining the intensity distribution,a non-linear characteristic is determined from fluctuation of adifference intensity of the detected grating pattern image. Using thedata on the differential intensity, the extent of the non-linearcharacteristic and the position(s) at which the non-linearcharacteristic occurs can be detected by simple arithmetic processing.With respect to correction of the intensity distribution, because theeffective drive voltage of the liquid crystal can be easily changed bymerely changing the voltage and phase of a dual value voltage level,correction to a linear intensity distribution can be easily performed.

[0058] Further, by using the grating pattern corrected to a linearintensity distribution in actual measurement, the intensity distributionand phase distribution of the deformed grating pattern directlycorrespond, so that the phase distribution can be calculated with highprecision, Consequently, high precision three dimensional shapemeasurement is possible. Also, by making the intensity distributionlinear, the number of times the grating pattern is projected need onlybe once or twice, shortening the measurement time until image detection,and making possible high speed measurement compared to prior art sinewave grating projection. Further still, even if the contrast or the likeof the grating pattern fluctuates due to fluctuations of thereflectivity of the object, stable, high precision measurement ispossible, without receiving the effect of the fluctuations.

BRIEF DESCRIPTION OF THE DRAWINGS

[0059]FIG. 1 is a diagram for explaining the structure and operation ofa first embodiment according to the present invention.

[0060]FIG. 2(a) and FIG. 2(b) are diagrams of examples of linearintensity distribution waveforms.

[0061]FIG. 3 is a diagram for indicating an intensity waveform of agrating pattern having a discrete intensity distribution and a linearlycorrected intensity waveform.

[0062]FIG. 4(a) and FIG. 4(b) are diagrams of grating pattern intensitywaveforms.

[0063]FIG. 5 is a diagram for indicating fluctuations of surfacereflections.

[0064]FIG. 6 is a diagram for explaining intensity changes and phaseconversion of a deformed grating pattern when surface reflectivityfluctuates.

[0065]FIG. 7 is a diagram for indicating the structure of a liquidcrystal grating having a striped structure.

[0066]FIG. 8 is a diagram for explaining a signal waveform for drivingthe liquid crystal grating.

[0067]FIG. 9 is a diagram for explaining the structure and operation ofa second embodiment of the present invention.

[0068]FIG. 10 is a diagram for indicating examples of linear intensitydistribution waveforms.

[0069]FIG. 11 is a diagram for indicating examples for explaining aphase distribution calculation method.

[0070]FIG. 12 is a diagram for indicating other examples for explaininga phase distribution calculation method.

[0071]FIG. 13 is a flow chart for explaining the operation of the secondembodiment of the present invention.

[0072]FIG. 14 is a diagram for explaining the structure and operation ofa third embodiment of the present invention.

[0073]FIG. 15 is a diagram for indicating an example of the waveform ofan effective voltage set to a linear intensity distribution.

[0074]FIG. 16 is a diagram for indicating an example of the waveform ofan effective voltage set to a linear intensity distribution.

[0075]FIG. 17 is a diagram for indicating the relationship between theliquid crystal grating drive voltage and transmitted light intensity.

[0076]FIG. 18 is a diagram for indicating examples of the waveforms ofgrating pattern intensity distributions.

[0077]FIG. 19(a) is a diagram for indicating an example of the waveformsof a linear intensity distribution and a difference intensity thereof,and FIG. 19(b) is a diagram for indicating an example of the waveformsof a nonlinear intensity distribution and a difference intensitythereof.

[0078]FIG. 20 is a diagram for indicating the relationship between theeffective voltage for driving the liquid crystal grating and transmittedlight intensity.

[0079]FIG. 21 is a diagram for indicating examples of waveforms wherethe effective voltage has been changed by changing the number ofgradations of the drive signal.

[0080]FIG. 22 is a flowchart for explaining an intensity distributiondetermination and correction operation.

[0081]FIG. 23(a) is a diagram for indicating waveform examples showingthe grating pattern and phase distribution of a single phase linearintensity distribution, and FIG. 23(b) is a diagram for indicatingwaveform example showing the grating pattern and phase distribution of adual phase linear intensity distribution.

[0082]FIG. 24 is a diagram for explaining the principle of the gratingpattern projection method.

[0083]FIG. 25 is a diagram for explaining the principle of thetrigonometrical method.

[0084]FIG. 26(a) is a diagram for indicating the intensity distributionof a prior art sine wave, and FIG. 26(b) is a diagram for explaining thephase shift of a sine wave.

[0085]FIG. 27 is a diagram for indicating the structure of a prior artmatrix type liquid crystal grating.

[0086]FIG. 28 (a) is a diagram for indicating the relationship betweenthe voltage of the liquid crystal grating and transmitted lightintensity, and FIG. 28(b) is a diagram for indicating a discrete sinewave intensity distribution.

DESCRIPTION OF PREFERRED EMBODIMENT

[0087] (First Embodiment)

[0088] In a grating pattern projection apparatus according to a firstembodiment, it is necessary to project a grating pattern havingcharacteristics that correspond to the irregularities of the objectwhose three dimensional shape is to be measured. Therefore, a liquidcrystal grating formed by liquid crystal elements is used, so that thepitch and intensity distribution of the projected grating pattern can bechanged. If the pitch of the grating pattern is made fine, theresolution is improved, therefore, with respect to the prior art inwhich the resolution of the projected area is 0.1%, the presentinvention can achieve a resolution of the projected area of 0.03%. Forexample, where the projection surface area of the grating pattern is 100mm×100 mm, irregularities can be measured with a resolution of from 0.1mm to 0.03 mm.

[0089] When preparing a grating pattern with a liquid crystal grating,one electrode of the liquid crystal element has a single commonelectrode structure (common electrodes) with the same potential. Theother opposite electrode has the pixels discretely formed at a constantpitch in one direction (X), and formed in a continuous striped structure(stripe electrodes) in a direction (Y) perpendicular to the direction(X). There are no gaps in the Y direction of the above stripe shapedpixel structure, so the aperture rate is increased and light utilizationefficiency is increased.

[0090] In the stripe shaped pixel structure, the transmitted lightintensity of the liquid crystal is controlled by a static type drivesignal. With a static drive, since a rectangular wave signal with a 50%duty ratio is applied at two voltage levels to the common electrode andthe stripe electrode, a simple drive signal can be used. Also, with thestatic drive, a predetermined voltage corresponding to the intensitydistribution set in the striped pixels is independently applied.Further, with the static drive, using a pulse width modulation methodfor changing the phase of the signal applied to the stripe electrodewith respect to the signal applied to the common electrode, the driveeffective voltage of the liquid crystal is controlled and liquid crystalgradation control is performed.

[0091] In the grating pattern projection apparatus the intensitydistribution of the projected grating pattern is important. This isbecause the intensity distribution of a deformed grating pattern image,deformed according to the irregularities of the object, and the positionof the object are coordinated, to increase the spatial resolution of themeasurement. As a result, it is set so that the intensity distributionin one cycle of the grating pattern is changed to linear. If theintensity distribution is linear, the phase also changes to linear, andthe intensity distribution and phase distribution have a directcorrespondence. In particular, a grating pattern having a triangularintensity distribution wherein the width of a linear area in which theintensity increases and the width of a linear area in which theintensity decreases are equal, and a phase distribution that is changedto a triangular waveform, is detected.

[0092] Also, as the liquid crystal grating is formed from discretepixels and the liquid crystal grating is driven by discrete voltagesteps, the intensity distribution of the projected grating pattern is adiscrete distribution and the deformed grating pattern image has anintensity distribution that has been digitized. A smoothing (equalizing)process is performed on the deformed grating pattern image data toconvert it to intensity data that has been smoothly changed. Further,the smoothing processed intensity distribution is corrected toapproximate a straight line, and is corrected to an intensitydistribution that changes linearly. Thus, a phase distribution thatchanges linearly is calculated from the corrected intensitydistribution.

[0093] Where the phase distribution is detected from a linear intensitydistribution image, the maximum intensity and minimum intensity of eachcycle of the deformed grating pattern are deformed, these maximum andminimum intensities are taken as a standard, and the intensities of eachposition of the deformed grating pattern are standardized. Theseintensities that have been standardized and linearly changed areconverted to phases of values that change linearly from 0 to 2π betweenstandardized maximum intensities or between standardized minimumintensities of each cycle. As these standardized intensities change instraight lines, the conversion precision to phases is high. The phasedistribution for each cycle are connected between each deformed gratingpattern.

[0094] Where the surface reflection of the object to be measured isconstant, the grating pattern having a linear intensity distributionneed only be projected only once, and the three dimensional shape can bemeasured from the detected phase distribution. Consequently, phaseshifting of the grating pattern is unnecessary. However, where thesurface reflectivity of the object to be measured is not constant,whether the fluctuations in intensity distribution of the deformedgrating pattern have occurred due to irregularities of the object orwhether they have occurred due to fluctuations in the surfacereflectivity of the object cannot be distinguished. In order to makethis distinction, two types of grating patterns, a first grating patternhaving a linear intensity distribution and a second grating pattern,whose phase is shifted by π from that of the first grating pattern andwhose intensity distribution is reversed, are prepared. Then, these twotypes of grating patterns are projected onto the object and a firstdeformed grating pattern image and second deformed grating pattern imageare detected.

[0095] Where the maximum intensity and minimum intensity of the firstand second deformed grating pattern images are constant, or where thesum of the intensities of the first and second deformed grating patternimages is constant, the surface reflectivity of the object is determinedto be constant. If at this time it is thought that the intensitydistribution has fluctuated due only due to the irregularities of theobject, standardization processing and calculation of the phasedistribution are performed, with the maximum intensity and minimumintensity of any one deformed grating pattern image from among the firstdeformed grating pattern image and second deformed grating pattern imageas a standard.

[0096] Where the maximum intensities and minimum intensities of thefirst and second deformed grating pattern images change due to theprojection position, or where the sum of the intensities of the firstand second deformed grating pattern images fluctuates discontinuously,it is determined that the surface reflection state of the object ischanged. In this case, the above standardization processing is performedusing the intensity distribution of a deformed grating pattern imagefrom among the first deformed grating pattern image and the seconddeformed grating pattern image. Next, a first phase distribution and asecond phase distribution are calculated respectively with regard to arange in which the surface reflectivity changes and a range other thanthat in which the surface reflectivity changes. Further, the first phasedistribution and second phase distribution are connected at a positionswhere the surface reflectivity changes.

[0097] The first embodiment according to the present invention will beexplained in detail using the drawings.

[0098]FIG. 1 shows an outline of a grating pattern projector using aliquid crystal grating. The light source 101 is constructed from a lightsource for lighting such as a halogen lamp or the like, and emits awhite light onto a liquid crystal grating 111 placed in front thereof.The liquid crystal elements that form the liquid crystal grating 111 areformed in a straight striped electrode pattern, N in number, having aconstant pitch and shape as explained above, and are driven by a liquidcrystal driver 112. The grating pattern having a linear intensitydistribution is prepared from the liquid crystal grating 111. Linearintensity distribution data is prepared by a linear intensitydistribution preparation unit 113, and drives the liquid crystal driver112.

[0099]FIG. 2(a) shows a first waveform example having a linear intensitydistribution. The waveform 121 is a waveform example having a saw toothwave form in which the intensity increase area changes continuously andthe intensity decrease area changes suddenly in a step form. FIG. 2(b)shows a second waveform example having a linear intensity distribution.The waveform 122 is a triangular waveform in which the intensityincrease area and the intensity decrease area both change continuouslyand the widths of the intensity increase area and the intensity decreasearea are equal. Although the waveforms 121 and 122 both have linearintensity distributions, the triangular wave intensity distributionshown in the waveform 122 is more favorable.

[0100] The liquid crystal grating 111 projects a grating pattern havinga linear intensity distribution through a projection lens 102 and ontothe object 100 whose three dimensional shape is to be measured. Thegrating pattern deforms (curves) according to the irregularities in thesurface of the object 100, and a two dimensional image of the deformedgrating pattern is detected by an image detection unit 104 comprising aCCD camera or the like, via a pickup lens 103 from a direction differentfrom the projection direction. The detected deformed grating patternimage includes data relating to the irregularities of the object 100.The detected deformed grating pattern image is processed by a arithmeticprocessing portion 114 to measure the three dimensional shape of theobject 100.

[0101] The arithmetic processing unit 114 performs image processing andthe like on the deformed grating pattern having a linear intensitydistribution, and is constructed from a smoothing arithmetic processingunit 115, a linear distribution correction unit 116, linear phaseconversion unit 117, and the like. The projected grating pattern, due tothe effect of the pixels of the liquid crystal grating 111 beingdiscretely formed, the effect of the lens characteristics of theprojection optical system, and the like, has an intensity distributionthat does not change to a linear intensity distribution, but insteadchanges to a non-linear somewhat stepped shape. The deformed gratingpattern image is smoothed by the smoothing arithmetic processing unit115 by a method of moving averages or the like, to convert it into animage whose intensity distribution changes smoothly. Next, the image isfurther processed by the linear distribution correction unit 116 andconverted into an image having a linear intensity distribution.

[0102] In the image having linear intensity distribution, the linearintensity distribution corresponds to the three dimensional shape of theobject 100. The corrected intensity distribution is standardized andconverted into a phase distribution. At this time, the linear phaseconversion unit 117 detects the maximum intensity and minimum intensityof each cycle of the deformed grating pattern image having linearintensity distribution, and converts the linearly changed values from 0to 2π between the maximum intensities or between the standardizedminimum intensities to phases, with the maximum intensity and minimumintensity as standards. As the phase distribution corresponds to theirregularities of the object 100, the actual three dimensional shape isobtained by the triangulation method described above using the phasedistribution.

[0103] The device structure shown in FIG. 1 is an example in which athree dimensional shape is measured from a single deformed gratingpattern image, by projecting a grating pattern having a linear intensitydistribution onto the object 100 only once. As fluctuations in theintensity distribution of the deformed grating pattern depend surfacereflections of the object 100 as well as irregularities of the object100, the above method is effective where the object 100 has a singlesurface reflectivity.

[0104] The operation of the arithmetic processing unit 114 will beexplained in detail using the intensity distribution waveform example ofthe deformed grating pattern shown in FIG. 3. It will be explained withthe example of a deformed grating pattern having the triangular waveintensity distribution indicated by the waveform 122 of FIG. 2(b).Reference number 131 of FIG. 3 is the intensity distribution of theliquid crystal grating 111, and the intensity distribution in the periodL of one cycle changes to linear with a step shape. The step shape isdue to the electrodes of the liquid crystal grating 111 being formeddiscretely, a discrete intensity distribution drive signal beingapplied, and the number of gradations of the linear intensitydistribution being kept to a small number. If the number of gradationsis large, the signal of the liquid crystal driver for driving the liquidcrystal grating 111 becomes complex and the number of projected gratingpatterns becomes less. The intensity distribution of the presentembodiment is a case where there are eight gradations in one cycle ofthe grating pattern.

[0105] Waveform 132 of FIG. 3 is a waveform that exhibits changes in theintensity level of the triangular wave intensity distribution 131indicated by gray gradations, intensities changing in a step form. Whenthe grating pattern having this intensity distribution is projected ontoto the object 100, image blurring occurs due to diffraction expansion,the characteristics of the projection optical system, and the like.Accordingly, the step width of the intensity distribution on the surfaceof the object 100 decreases, and the intensity distribution becomessomewhat a intensity distribution such as the waveform 133 of FIG. 3.The deformed grating pattern image detected by the image detectionportion 104 is converted to a signal in which the intensity changessubstantially smoothly in the smoothing arithmetic processing portion115 using a method of moving averages. Further, a straight lineapproximation is performed on the smoothed signal in the lineardistribution correction portion 116, to convert it to a signal thatchanges linearly. In other words, in the present embodiment, even if thenumber of gradations of the projected grating pattern is low, imageprocessing is performed in a state where the number of gradations of thedeformed grating pattern is high.

[0106] The waveform 134 of FIG. 3 is an example of a signal that hasbeen straight line approximated by the linear distribution correctionportion 116. Using the waveform 134, an intensity distribution thatchanges linearly is converted to a phase distribution that changeslinearly. Here, the maximum intensity of the signal 134 is Vm and theminimum intensity is Vn. Where the surface reflectivity of the object100 is constant, the intensities Vm and Vn are constant at any location.The intensities in each cycle are standardized by setting Vm to 1 and Vnto 0. For example, a straight line type proportional process isperformed with the phase of the maximum intensity position as 0 and thephase of the minimum intensity position as π, so that the phase of anyintensity position within one cycle can be made a value within the rangeof 0 to 2π. Consequently, phases that do not rely on the value of theintensity can be obtained.

[0107] By correcting discrete intensity distributions to intensitydistributions that change linearly, phase calculation accuracy isincreased compared to the case of prior art sine wave intensitydistributions. Also, even if it is a grating pattern having an intensitydistribution that changes in step form with coarse gradations, byconverting it into a continuous straight line intensity distribution, itbecomes equivalent to preparing a grating pattern having a high numberof gradations, improving in-plane resolution. Further still, in the caseof an object with the same surface reflectivity, the measurement timecan be shortened by not performing phase shifting.

[0108] The operation in cases where the object 100 has a plurality ofsurface reflectivities will be explained. When the surface of the object100 is constructed from a plurality of materials having differentreflectivities, it cannot be distinguished whether the intensityfluctuations have occurred due to irregularities or fluctuations in thesurface reflectivity with only one deformed grating pattern image. Thus,in the present invention, two types of grating patterns having differentintensity distributions are projected onto the object 100. The intensitydistribution 141 of FIG. 4(a) is identical to the intensity distribution131 of FIG. 3, and is the intensity distribution of a first gratingpattern whose intensity changes in a step form and linearly. Thewaveform 142, as explained by FIG. 3, is a signal in which a firstdeformed grating pattern image is corrected to a linear intensitychange. The intensity distribution 143 of FIG. 4(b) is the intensitydistribution of a second grating pattern, whose phase has been shifted(inverted) by π with respect to the intensity distribution of the firstgrating pattern. The waveform 144, similarly to the waveform 142, is asignal in which a second deformed grating pattern image is corrected toa linear distribution.

[0109]FIG. 5 is the distribution of the surface reflectivity of theobject 100, the surface reflectivity differing between an area 145 andan area 146. In the case of the present embodiment, the first gratingpattern and second grating pattern having the same pitch but whoseintensity distributions are inverse are each projected sequentially ontothe object 100, and a first deformed grating pattern and second deformedgrating pattern whose phases differ by π are sequentially detected.Comparing this with the prior art sine wave intensity distributionpattern projection method, in the present embodiment the point thatfluctuations in the surface reflection state of the object can bedetermined from fluctuations in the combined intensity distributions ofthe two types of deformed grating patterns, and the point that theboundary positions where the reflectivity changes can be detected,differ from the prior art.

[0110] Using FIG. 6, a detailed operation where the two types of gratingpattern are projected will be explained. The waveform 151 indicated bythe solid line in FIG. 6 is a first deformed grating pattern intensitysignal, the waveform 152 indicated by the broken line is a seconddeformed grating pattern intensity signal. In the present embodiment,the intensity fluctuations of the two deformed grating patterns arecompared to detect fluctuations in the reflection state of the surface.The waveforms 151 and 152 both have the same maximum intensity andminimum intensity and both have intensities that change linearly, in thesingle cycle intervals 161 and 162. Further, in the single cycleintervals 161 and 162 the intensity sum of the two signals is constant.As a result, the reflectivity of the surface is determined to be thesame in these intervals. Thus, standardization and proportionalprocessing of the intensities shown in FIG. 3 are performed on eitherone of the signals of the waveforms 151 and 152, to convert it to phasethat changes linearly.

[0111] The solid line waveform 153 and the broken line waveform 154 arethe linear intensity signals of the first deformed grating pattern andthe second deformed grating pattern. In the present embodiment thesignal intensities differ in the single cycle intervals 163 and 164. Inthe interval 163 the intensities change linearly across the entirecycle, the maximum intensities and minimum intensities are the same asthose of the interval 161 described above, and the sum of theintensities is constant. However, in the area of the interval 165 ininterval 164 the intensities change discontinuously and the values ofthe maximum intensities and minimum intensities differ from those of theinterval 163. The waveform 155 is the change in the sum of theintensities of the two waveforms 153 and 154, and the sum of theintensities change discontinuously at the boundary positions of theinterval 165. Thus, it is determined that the reflection state of thesurface has changed in the interval 165. In the present embodiment thereflectivity of the interval 165 is higher than the reflectivity of theinterval 163.

[0112] The waveform 156 is a phase distribution that changes linearly.The waveform 156 is a phase that changes within a range of from 0 to 2πin one cycle, converted from the intensity distribution of either one ofthe first deformed grating pattern and the second deformed gratingpattern by the method described above. As the reflectivity in theinterval 163 is constant, the intensity is converted to a phase byproportional processing. However, as the reflectivity in part of thecycle 164 differs for an interval, the intensity cannot be converted toa phase by simple proportional processing. Thus, in the intervals 166and 167 (corresponding to the first phase) within the interval 164, theintensity is converted to the first phase (o to θ and φ to 2π) indicatedby the solid line. In the interval 165 (corresponding to the secondphase) within interval 164, proportional processing is performed on theintensity to convert it to a second phase (θ to φ). Then, at thepositions where the intensity is discontinuous (A and B in FIG. 6), thefirst phase and the second phase are smoothly connected. By this means,the second phase is arranged at the position indicated by the brokenline (157 in FIG. 6). As described above, by comparing the intensitiesof the two deformed grating patterns to detect fluctuations in thesurface reflectivity, the phases are detected according toirregularities only, without being influenced by intensity fluctuationsdue to surface reflections.

[0113] In the present embodiment, because it is permissible to projectonly two grating patterns having inverse intensity distributions, thenumber of phase shifts can be low, and the measurement time is shorterthan the case of the prior art phase shift. From the above, in thepresent invention, a single grating pattern is projected where thesurface of the object is the same reflective materials, and where thereflective materials differ, the grating patterns to be projected areselected according to the reflection state of the surface so that onlytwo grating patterns are projected.

[0114] Next, the structure of the liquid crystal grating that preparesthe grating pattern will be described. The liquid crystal grating 111according to the present invention has a striped electrode structure andis driven by a static type drive signal. The reference number 170 ofFIG. 7 indicates an example of the stripe electrode structure. Thestripe electrodes 170 are constructed from N number of pixels 171, 172,. . . that are continuous in the vertical direction and discretelyindependent at a constant pitch in the horizontal direction. At thistime, with regard to the width of the pixels in the horizontaldirection, these have a structure wherein the gaps between the pixelsare made narrow to increase the efficiency of light use (high aperturerate). As a liquid crystal grating, a single common electrode having thesame potential over its entirety is formed on a glass substrate on theside opposite the glass on which the stripe electrodes are formed. Also,color filters such as those used for television displays and the likeare removed and a monochromatic grating pattern is projected.

[0115] Where one cycle of the grating pattern has n number of intensityelements (n=8 in row 141 of FIG. 4(a)), and each intensity element isformed from m number of stripe electrodes, the number of gratingpatterns is N/(n×m). In the present invention a result the same as onewith a high number of gradations is obtained by the smoothing processand linear correction, even when the number of linear gradations is nothigh. As a result, when deciding the number of intensity elements of onecycle, m is set low where the number of grating patterns is increased.Alternatively, where the number of grating patterns is low, m can be sethigh.

[0116] In the case of a liquid crystal grating having a TN structure,the light transmittance characteristic of the liquid crystal isdetermined according to the effective voltage applied between the commonelectrode and stripe electrodes. Thus, the drive signal is prepared fromthe linear intensity data prepared by the linear intensity distributionpreparation unit 113 so that an effective voltage value corresponding tothe linear intensity can be obtained. Because the electrode structure ofthe liquid crystal grating of the present invention has one commonelectrode opposite the stripe electrodes, a static type drive system canbe applied. The liquid crystal drive signal when static driving isperformed, it is a rectangular wave signal having two intensity levels.The effective voltage is changed by changes to the phase of the signalapplied to the stripe electrodes with respect to a common signal appliedto the common electrode. Due to the static drive driving each of theindividual stripe electrodes, an arbitrary voltage can be applied toeach electrode and the drive margin limit of the liquid crystal issmall.

[0117]FIG. 8 shows an example of a liquid crystal drive signal waveformwhen a linear intensity distribution is realized. The signal 181 is acommon signal applied to the common electrode, and is a rectangular wavesignal in which one cycle has intensity levels (0 to V) of values 2T and2, and the duty ratio is 50% (the H level and L level intervals areequal). Signals 182 and 183 are rectangular signals both applied to thestripe electrodes, have the same cycle, duty ratio and voltage levels asthe common signal 181, and different phases to the common electrode 181.Signal 182 has a small phase difference to the signal 181, while thesignal 183 has a large phase difference to the signal 181. Comparingsignal 182 and signal 181, the interval during which they both have acommon voltage within one cycle is long. Accordingly, as can beunderstood from signal 184, where both have the same voltage, thevoltage applied between the liquid crystals is 0 and overall theeffective voltage becomes small. In this manner, the linear distributionintensity can be decreased. With respect to this, comparing signal 183and signal 181, the interval during which both have a common voltage inone cycle is short. Consequently, overall, the effective voltage islarge and the linear distribution intensity can be increased.

[0118] Signal 184 and signal 185 are between electrode voltage signals,applied between the electrodes facing the liquid crystals. Signals 184and 185 correspond respectively to the drive signals 182 and 183. Theeffective voltage, because it is determined according to a phasedifference of signals applied to the common electrode and stripeelectrodes, modulates the phase with respect to the common electrode 52according to the strength of the linear intensity. In other words, thepulse width of the stripe electrode drive signal, which coincides withthe potential of the common signal, is modulated, and the linearintensity is set freely. In this manner, the signal 182 becomes a signalset to a small linear intensity, and signal 183 becomes a signal set toa large linear intensity. By applying the static drive method to theabove stripe electrodes, a high contrast, low noise grating pattern canbe prepared. At this time, a signal whose phase is changed with respectto the signal 181 is prepared so that the intensity of the lineardistribution is changed in proportion. Also, where a constant voltage isapplied, the effective voltage can be adjusted by adjusting the width inone cycle.

[0119] (Second Embodiment)

[0120] In the grating pattern projection apparatus according to a secondembodiment, a liquid crystal grating formed by liquid crystal elementsis used so that the pitch length and intensity distribution of theprojected grating pattern are freely adjustable. The intensitydistribution of the grating pattern projected onto the object is set sothat it has a linear intensity distribution within one cycle of thegrating pattern. The grating pattern, in particular, is preferably setso that the width of an area where the intensity increases linearly andthe width of an area where it decreases linearly are equal, theamplitudes of each of the intensity increase area and decrease area arealso equal, and it has a symmetrical triangular wave intensitydistribution. The single phase linear signal that creates the linearintensity distribution grating pattern is a linear signal whose voltageis discrete and stepped within one cycle of the grating pattern, asignal that changes symmetrically every half cycle, and a signal fordriving the liquid crystal grating. The voltage step width is setaccording to the number of gradations that dictate the fineness of theintensity distribution, by the single phase linear signal. When thegradations are to be increased and the intensity of the grating patternchanged in small increments, the voltage step width is set small.

[0121] Even when the voltage of the liquid crystal drive signal is adiscrete signal that changes in steps, the intensity distribution of thegrating pattern projected by the liquid crystal grating makes asubstantially continuous linear intensity distribution pattern due to adiffraction effect caused by the grating pattern, an image blurringeffect on the grating edge portions caused by the optical system, or thelike. Generally, the higher the gradation, the more the surface densityof the grating pattern is improved. However, the grating pattern havingthe linear intensity distribution according to the present invention canbe processed as a grating pattern of substantially the same quality as agrating pattern having high gradation, even if the gradation is not sethigh, by giving it a linear distribution and using the image processingmethod to be described below. Therefore, a drive signal having a lineardistribution of approximately eight gradations for example can beprepared. The grating pattern is projected onto the object once only, adeformed grating pattern image of one phase only is detected and stored,and a three dimensional shape is calculated by processing the singlephase image signal.

[0122] The arithmetic process is performed by detecting peak intensities(maximum intensity and minimum intensity) of each cycle of the singlephase image signal and pixel positions where the peak intensities areobtained, and detecting fluctuations in the rate of intensity change.Further, the surface reflection state of the object is detected from thepeak intensities, and changes in the irregular shape of the object aredetected from the rate of intensity change. In particular, the rate ofintensity change is an important value that corresponds to changes infine irregularities in the object existing within one cycle of thedeformed grating pattern.

[0123] Detection of the peak intensities and rate of intensity change isnot detection by intensities between two continuous pixels, butdetection from intensities between pixels separated by a preset steponly (stepped pixels interval). The rate of intensity change is detectedfrom a difference value in the intensities of stepped pixel intervals.By detecting at stepped pixel intervals, simplification and accelerationof the processing can be realized. As the basic intensity distributionis linear, processing of stepped pixel intervals is possible. where therate of intensity change in one cycle fluctuates, the rate of intensitychange is discretely separated into segments. As a result, a pluralityof slice intensity levels are provided in the rate of intensity change,the detected rate of intensity change and slice intensity levels arecompared, and the rates of intensity change in the regions of the setslice intensity levels are separated. At this time, the width of theregion where the rate of intensity change changes is used in thedetermination that takes place when they are separated. Accordingly,separation is not performed when the rate of intensity change fluctuatesin small widths. By means of the above method, the rate of intensitychange separated into a number of regions, and image positions wherefluctuations in the rate of intensity change occur, are stored.

[0124] The intensity distribution of the deformed grating patternfluctuates due to irregularities in the object and surface reflectivityfluctuations. Here, because whether fluctuations in the intensitydistribution of the single phase image signal are irregularities orfluctuations in reflectivity is distinguished, fluctuations in the peakintensities of the single phase image signal are detected. Where thepeak intensities in each cycle of the single phase image signal areconstant, the reflectivity within that range is determined to beconstant and, if the peak intensities fluctuate, the reflectivity in thevicinity of positions where they change is determined to havefluctuated. Where the peak intensities are constant, the phasedistribution for measuring the irregularities of the object iscalculated based on rate of intensity change data. Where the peakintensities fluctuate, the phase distribution for measuring theirregularities of the object is calculated based on both peak intensityand rate of intensity change data.

[0125] As the intensity distribution of the single phase image signalchanges if the irregularities of the object change, the irregularitiesof the object are detected from fluctuations in the rate of intensitychange. If the intensity distribution of the deformed grating pattern isa symmetrical triangular waveform distribution, the rate of intensitychange of the single phase image signal is a positive/negative equalvalue. Thus, the rate of intensity change appears as an absolute value.If the absolute value of the rate of intensity change in one cycle ofthe single phase image signal is constant, because the signal intensityduring that interval undergoes a constant linear change, theirregularities of the object have the same constant gradient. If theabsolute value of the rate of intensity change in one cycle fluctuates,the gradient of irregularities of the object during that intervalchange.

[0126] The irregular shape of the object is calculated from the phasedistribution according to the rate of intensity change of the singlephase image signal. As the rate of intensity change changes not only dueto the irregular shape but also due to reflectivity fluctuations in theobject, fluctuations in rate of intensity change due to reflectivityfluctuations are cancelled out, and rates of intensity change due toirregularities are extracted to calculate phase distribution. Forexample, the rate of intensity change at a position where thereflectivity changes, changes stepwise in widths of a few pixels. Therate of intensity change that occurs in this case is canceled as a typeof noise. If the rate of intensity change in one cycle of the singlephase image signal is constant, it is converted to a phase that changeslinearly with a uniform gradient across the entire cycle. If the rate ofintensity change in one cycle of the single phase image signalfluctuates, a phase distribution that changes linearly in each rangeseparated according to the size of the fluctuation is calculated.

[0127] If the rate of intensity change in one cycle of the single phaseimage signal is constant, the phase difference between maximumintensities or between minimum intensities of the single phase imagesignal within that cycle is standardized to 2π, a phase is allocated toeach pixel position from a proportional relationship between a standardnumber of pixels in maximum intensity gaps or minimum intensity gaps andeach pixel position, and phases that change linearly within one cycleare calculated. In other words, the phases are not calculated from theratio of the intensity of each pixel position to the peak intensities,but rather the pixel positions in one cycle are converted directly tolinear phases. Here too, the basic shape of the intensity distributioncan be linear, and simplification and acceleration of the arithmeticprocessing can be realized. At this time, if the single phase imagesignal is a symmetrical triangular wave signal, the phase difference atintervals of half a cycle in regions where the intensity increases andregions where it decreases can be standardized to π and allocated tophases that change linearly with each range, and the phases can beconnected later.

[0128] If the rate of intensity change in one cycle of the single phaseimage signal changes, the phase difference between maximum intensitiesor between minimum intensities of the single phase image signal withinthat cycle is standardized to 2π, and a phase is allocated to each pixelposition within each region according to a proportional relationshipbetween a standard number of pixels in maximum intensity gaps or minimumintensity gaps and each pixel position, and the slice intensity level ofeach region. Next, the phase of each region is connected at boundarypositions where the rate of intensity change changes, and a phasedistribution in which gradients in one cycle differ but change linearlywithin each region is calculated.

[0129] Hereafter, the second embodiment according to the presentinvention will be explained in detail using the drawings. FIG. 9 showsan outline of a grating pattern projection apparatus using a liquidcrystal grating. A light source 201 is constructed from a white lightsource for lighting such as a halogen lamp or the like, and emits awhite light onto a liquid crystal grating 211. A single phase linearsignal preparation unit 212 prepares a single phase linear signal whoseintensity during one cycle changes linearly and applies it to the liquidcrystal grating 211. The liquid crystal grating 211 creates a gratingpattern having a linear intensity distribution according to the singlephase linear signal, and projects it through a projecting lens 202 ontothe object 200 whose three dimensional shape is to be measured.

[0130]FIG. 10 shows a waveform example having a linear intensitydistribution. The waveform 221 is the waveform of a single phase linearsignal for driving the liquid crystal grating 211, and the waveform 223is an intensity distribution waveform of a grating pattern having alinear intensity distribution. Th single phase linear signal 221 is asignal whose voltage is discrete, which has a stepped waveform, andwhich changes in linear steps, and the interval of one cycle of which isL. The liquid crystal grating 211 has a structure in which the pixelsare separated and independent, and due to reasons such as limitationswhen preparing the drive signal and the like, is driven by voltage thatchanges stepwise. At this time, the step voltage and the number ofliquid crystal pixels to which the same voltage is applied are setaccording to the size and number of liquid crystal pixels, the number ofgrating patterns projected, the intensity gradation, and the like. Theexample of FIG. 10 is a five gradation signal having five levels betweenthe minimum intensity and the maximum intensity.

[0131] The waveform 222 indicated by the dotted line in FIG. 10 is atriangular wave signal that is symmetrical in the interval of oncecycle, has had its intensity changed to link the central portions of thestepped wave, in which the widths of the intensity increase regions andthe intensity decrease regions are equal, and which has the same voltageamplitude as the waveform 221. The waveform 223 is the intensitydistribution waveform of the grating pattern projected onto the object200 and has a symmetrical triangular intensity distributioncorresponding to the waveform 222. Even if the voltage of the singlephase linear signal is a step shape, the projected grating pattern has adistribution whose intensity changes substantially continuously. This isbecause a blurring effect occurs in the edge portions of the liquidcrystal grating 211 due to diffraction or the like caused by theshortness of the grating pitch of the liquid crystal grating 211.Although 32 gradations or more were required in the prior art sine waveintensity distribution, an intensity distribution having acceptablelinearity can be attained even when the linear intensity distribution isonly on the order of eight gradations, and the drive signal is easilyprepared compared to the prior art sine wave.

[0132] The grating pattern projected onto the object 200 distortsaccording to the irregularities in the surface of the object 200, and atwo dimensional image of the deformed grating pattern is detected by asingle phase image detection unit 204 comprising a CCD camera or thelike, via a pickup lens 203 from a direction different from theprojection direction, and stored. The present invention is a structurethat image processes by projecting one (single phase) grating pattern,and detecting one (single phase) deformed grating pattern only. Thebasic shape of the intensity distribution of the single phase deformedgrating pattern is a linear intensity distribution corresponding to theprojected grating pattern. The single phase image signal whose intensitychanges linearly and which was detected by the single phase imagedetection portion 204 is image processed by the single phase linearimage processing portion 214 and the three dimensional shape of theobject 200 is calculated.

[0133] The single phase linear image processing unit 214 is constructedfrom a single phase signal intensity fluctuation detection unit 215 fordetecting fluctuations in the intensity of the single phase imagesignal, and a linear phase distribution calculation unit 216 forcalculating a linear phase distribution according to the detectionresult of the intensity fluctuation of the single phase signal. Theintensity of the single phase image signal fluctuates according tochanges in the irregularities of the surface and the surfacereflectivity of the object 200. Fluctuations are detected from thesymmetrical linear distribution which is the basic intensitydistribution of the single phase image signal, the phase distributioncorresponding to these fluctuations are calculated, and the irregularshapes are measured. Accordingly, in the present invention, detection ofthe intensity fluctuations of the linear single phase image signal is animportant requisite.

[0134] The single phase signal intensity fluctuation detection unit 215detects the sizes of peak intensities of the signal and the pixelpositions which are the peak intensities in each cycle of the singlephase image signal, and detects fluctuations in the rate of intensitychange occurring in each cycle of the single phase image signal. Thesizes and positions of the peak intensities are detected from theintensities between step pixels, and the rate of intensity change isdetected from the difference in intensities between step pixels. If therate of intensity change within one cycle is constant, the intensity ofthe single phase image signal in one cycle changes with a constantgradient, and the irregularities are constant. If the rate of intensitychange in one cycle fluctuates, the gradient of the intensity of thesingle phase image signal in one cycle changes, and the irregularitiesfluctuate. At this time, a distinction of reflectivity fluctuation andirregularity fluctuation is performed according to pixel widths wherethe rate of intensity change occurs.

[0135] The linear phase distribution calculation unit 216 calculates thephase distribution that changes linearly in each cycle of the singlephase image signal based on the intensity fluctuation detection resultof the single phase signal intensity fluctuation detection unit 215. Ifthe rate of intensity change within one cycle is constant, a phasedistribution that changes linearly with a uniform gradient across theentire cycle is calculated. At this time, the interval of maximumintensity and the interval of minimum intensity of the single phaseimage signal is tak n as one cycle, and the phase difference of astandard pixel interval is standardized to 2π. Also, the phasedetermined by the proportional relationship between the number of pixelsin a standard pixel interval and each pixel position is allocated toeach pixel position, to calculate a phase that changes linearly as awhole.

[0136] If the rate of intensity change in one cycle fluctuates, a numberof slice intensity levels are provided with respect to the rate ofintensity change. Then, the detected rate of intensity change iscompared to the set slice intensity level, is divided into a number ofdiscrete rate of intensity change regions, and detected together withthe pixel positions where these region change. At this time, separationis not performed if the pixel width in the regions where the rate ofintensity change changes is small. The rate of intensity change withineach of the regions is assumed to be constant and a phase distributionthat changes linearly in each region is calculated. In this case too,the phase difference of a standard pixel interval in one cycle of thesingle phase image signal is standardized to 2π, and a phasedistribution that changes linearly within the limits of the regions iscalculated according to the proportional relationship between thestandard number of pixels and pixel positions within the regions, andthe size of the rate of intensity change. Next, the phases in eachregion at the boundary positions where the rate of intensity changechanges are connected, and a phase distribution is calculated thatchanges linearly in each of the segments of one cycle.

[0137] The specific operations of the single phase signal intensityfluctuation detection unit 215 and the linear phase distributioncalculation unit 216 will be explained using the various waveformexamples shown in FIG. 11. The waveform 230 of FIG. 11 is an example ofa single phase image signal waveform, waveform 231 is an example of arate of intensity change waveform, and waveform 232 is an example of aphase distribution waveform. In the present invention, fluctuations inthe intensity level of the single phase image signal 230 and the rate ofintensity change waveform 231 are calculated, and the phase distributionwaveform 232 is calculated from these data.

[0138] The single phase image signal 230 of FIG. 11 has a half cycleintensity fall interval 241 and a half cycle intensity rise interval 242in the interval 251 of one cycle, both the intervals 241 and 242 havingtheir intensities changing linearly at a uniform gradient at a value Pwhere the amplitude is constant. Within the interval 251 thereflectivity of the object 200 is determined to be constant, and pixelpositions g1 and g2 of maximum intensity taken as the standard positionsof one cycle are detected and stored. Also, if the intensity of thesingle phase image signal 230 fluctuates minutely due to noise and thelike, after being converted to a signal whose intensity changes smoothlyby being smoothing processed or the like, it can be subjected to signalprocessing.

[0139] The rate of intensity change waveform 231 of FIG. 11, in the fallinterval 241 and rise interval 242 of the one cycle interval 251, has aconstant size value whose size is equal but whose sign differs (−Sp andSp). To express this as an absolute value, in the one cycle interval251, the rate of intensity change is constant. Accordingly, thereflectivity of the object 200 in this interval is constant andirregularities are also constant.

[0140] The phase distribution waveform 232 of FIG. 11, due to theabsolute value of the rate of intensity change being constant betweenthe pixel g1 and pixel g2 of the one cycle interval 251, has a phase inthe interval 251 which changes continuously and linearly from 0 to 2π.Taking both the pixel g1 and the pixel g2 of the interval 251 asstandard pixels, the phases at the position of the pixel g1 and theposition of the pixel g2 are respectively 0 and 2π. Thus, the phase ofeach pixel position can be calculated from the proportional relationshipbetween the number of pixels Δg (=g2−g1) between the standard pixels andeach pixel position. For example, the phase φ of a pixel position gn inthe interval 251 is calculated by φ=2π(gn−g1)/Δg. In other words, thephase of each pixel position is not calculated from the intensity ofeach pixel position with respect to the amplitude P of the single phaseimage signal 230, but rather the phase of each pixel position iscalculated from the proportional relationship of the number of pixelsand the pixel positions. Using this method, it is possible for theintensity of a single phase image signal to change linearly, and thephase calculation process is easy.

[0141] In the next one cycle interval 252, the intensity changesdiscontinuously in the interval 253 therein, and the minimum intensityalso changes. As a result, it is determined that the reflectivity of theobject 200 is changing within the interval 253. The rate of intensitychange waveform 231 in this case changes discontinuously and stepwise atthe positions 247 and 248. Where the rate of intensity change changesstepwise, a determination that the reflectivity only has changed isperformed. Accordingly, even if fluctuations occur in the rate ofintensity change, they are not compared to a slice intensity level andare separated into rate of intensity change regions.

[0142] The rate of intensity change of the intensity fall interval 245and intensity rise interval 246 of the interval 253 is a value the sameas in the case of the interval 251. Also, the rate of intensity changein intervals 243 and 244 on both sides of the interval 253 within theone cycle interval 252 is a value equal to the rate of intensity changein the interval 251. In this case, the entirety of the interval 252 isthe same irregularity shape, and the same irregularity shape as theinterval 251. In the interval 252, as in the interval 251, the phase ofeach pixel position is calculated from the proportional relationshipbetween the standard number of pixels in the one cycle interval 252 andeach pixel position. Consequently, as an entire cycle, a phase thatchanges continuously from 0 to 2π is calculated. In this way, even if astepwise fluctuation occurs in the rate of intensity change, the phasedistribution can be calculated without receiving that effect.

[0143] Other operations of the single phase signal intensity fluctuationdetection unit 215 and the linear phase distribution calculation unit216 will be explained using the other waveform examples shown in FIG.12. The waveform 260 of FIG. 12 is a waveform example of a single phaseimage signal, the waveform 261 is a waveform example of a rate ofintensity change, and the waveform 262 is a waveform example of a phasedistribution. Here, a case is shown wherein, although the reflectivityin one cycle is constant, the rate of intensity change fluctuates.

[0144] In the waveform 260 of the single phase image signal of FIG. 12,the interval 251 of one cycle, is the same as in the case of FIG. 11,and the rate of intensity change in that interval is constant. In theinterval 271, as indicated by the waveform 261 of the rate of intensitychange, the rate of intensity change changes in the interval 272 withinthe cycle, and the rate of intensity change changes further in theinterval 273 therewithin. Since the peak intensity of the single phaseimage signal in the interval 271 in one cycle is a constant value P, thereflectivity in that interval is constant and the irregular shapechanges.

[0145] In the interval 273 within the interval 272, the rate ofintensity change is greater than in the interval 251, and in the otherintervals within the interval 272, the rate of intensity change is lessthan in the interval 251. Also, the rate of intensity change in theother intervals 243 and 244 within the interval 271 is the same as ininterval 251. Further, several slice intensity levels of the rate ofintensity change are provided. In addition, the rate of intensity changeobtained from the single phase image signal and the slice intensitylevels are compared, and the rate of intensity change is separated intosegments having discrete slice intensity levels. The waveform 261 of therate of intensity change is a waveform that indicates a rate ofintensity change separated into segments of discrete slice intensitylevels. Also, in interval 271, pixel positions g3, g4, g5 and g6 wherethe segments change are detected and stored. When the rate of intensitychange is large, the change in irregularities also appears large, andwhen the rate of intensity change is small, the change in irregularitiesalso appears small. Also, in the present embodiment, because thereflectivity in interval 271 is constant and the pixel width (region) ineach segment is broad, separation is performed for each segment.

[0146] The waveform 262 of phase distribution in interval 271 is a phasecalculated distribution that changes linearly in each segment. In thiscase too, as in the example described above, the phase of each pixelposition is calculated from the proportional relationship between thestandard number of pixels in one cycle interval and each pixel position.In this case, with respect to the proportionally distributed phases, thegradient of the phase change of each region is made different accordingto the size of the rate of intensity change. Where the rate of intensitychange is large, the rate of change of the phase corresponds to large.Because this rate of intensity change is discretely classified, thegradient of the phase change is determined according to thisclassification.

[0147] In this manner the calculated phase widths of each region aretaken as Δφ1, Δφ2, Δφ3, Δφ4 and Δφ5, and continuity of the phases at theboundaries of each region is performed. In this way, as shown in thephase distribution waveform 262, the phases at each boundary arerespectively φ1, φ2, φ3 and φ4, and phases that change linearly in eachregion from 0 to 2π over the entire cycle are calculated. In this casealso, by detecting fluctuations of the rate of intensity change and thepixel positions that fluctuate, the phase distribution can be simply andprecisely calculated.

[0148]FIG. 13 shows a flow chart of the arithmetic process whencalculating the phase distribution within one cycle of the single phaseimage signal according to the present invention. Step 280 performsdetection and storage of a single phase image signal of the deformedgrating pattern image. Step 281 sets a step pixel number for performingprocessing of the single phase image signal, and takes the intensity atpixel positions separated into five pixels, for example, as the subjectto be processed. Step 282 detects a peak intensity (maximum intensity orminimum intensity) within one cycle of the single phase image signal andthe pixel positions which are peak intensities. Step 283 detects andstores a standard number of pixels in one cycle of a maximum intensityinterval or a minimum intensity interval detected in step 282. Thisstandard number of pixels is a standard when performing the followingphase calculation.

[0149] In the detection of the rate of intensity change in step 284,this is calculated from a difference value of the intensity betweenpixels which are the target. Step 285 determines the existence ofirregularities and reflection fluctuations in one cycle, and determinesthis from data of both fluctuations of the peak intensities of step 282and fluctuations in the rate of intensity change of step 284. Generally,if the peak intensity changes, the reflectivity changes, and if the rateof intensity change changes, the irregularity distribution changes.Also, where fluctuations of the rate of intensity change occur betweenstepwise narrow width pixels, it is determined that these are boundarypositions where the reflectivity fluctuates. In the subsequentprocessing steps, only rates of intensity change due to irregularityfluctuations are extracted, according to the above determination result.

[0150] In step 286, the slice intensity levels, for separating the rateof intensity change into discrete segments, are set. Step 287 comparesthe slice intensity levels with the rate of intensity change detected instep 284, and separates the discrete rate of intensity change intosegments. If the rate of intensity change does not fluctuate, the entirecycle is one segment. At this time, it is determined whether to separatethe rate of intensity change according to the irregularity andreflectivity fluctuation determination result of step 285. For example,as indicated by 247 and 248 in FIG. 11, where the rate of intensitychange changes stepwise in narrow widths, it is processed as a type ofnoise, and not separated. Step 288 the pixel positions of the boundariesof each segment are detected and stored.

[0151] In step 289, calculation of phases that change linearly in theregion of each segment is performed. As the rate of intensity change ineach region is constant, positions in those regions change uniformly tolinear. Phase processing takes the phase difference of the interval ofone cycle as 2π. If the rate of intensity change in the interval of oneperiod is constant, the phase of each pixel position can be calculatedfrom the proportional relationship between the standard number of pixelsin one cycle interval and each pixel position. If the rate of intensitychange in the interval of one period fluctuates, the phase of each pixelposition in each region is calculated. In other words, in each region,the phase of each pixel position is calculated from the proportionalrelationship between the number of pixels included in a region and eachpixel position, using the phase change gradient that changes linearlywith the region.

[0152] Step 290 is connection of the phases, and connects the phasescalculated for each region at the boundary positions of each region.Accordingly, step 290, although there are kinks at the boundarypositions of each region, calculates phase distributions that changelinearly at different gradients across the entire cycle. Phasedistributions of each cycle detected by the above procedure areconverted to two dimensional phase distributions, and three dimensionalshapes are calculated from the two dimensional phase distributions.

[0153] As clarified by the above explanation, the present inventionprojects onto an object a single phase grating pattern having a linearintensity distribution by driving a liquid crystal grating with a singlephase linear signal, detects a only single phase deformed gratingpattern image, and image processes a single phase image signal. In theimage processing of the single phase image signal, in particular,fluctuations in a rate of intensity change are detected, a phasedistribution the changes linearly according to the detected fluctuationsis calculated, and a three dimensional shape is measured from thecalculated phase distribution.

[0154] (Third Embodiment)

[0155] In the grating pattern projection apparatus according to a thirdembodiment, a liquid crystal grating formed by liquid crystal elementsis used so that pitch length and intensity distribution of the projectedgrating pattern can be freely adjusted by electric signals. Theintensity distribution of the projected grating pattern is an importantrequisite that determines measurement resolution measurement time and,in particular, gradations must be imparted on the intensity distributionin each cycle in order to increase resolution. Thus, the intensitydistribution of the grating pattern is set to have a linear intensitydistribution in each single cycle. In particular, this linear intensitydistribution is preferably a symmetrical triangular waveformdistribution in which the length and amplitude of a region where theintensity increases linearly and a region where the intensity decreaseslinearly are both equal.

[0156] In order to set a grating pattern having a linear intensitydistribution, a linear distribution signal is prepared to drive theliquid crystal grating. At this time, the linear distribution signal isa signal in which an effective voltage for driving the liquid crystalgrating is discrete and changes stepwise and linearly, and is set to asignal that changes symmetrically every half cycle of the gratingpattern. The number of steps when the effective voltage changes stepwisecorresponds to the number of gradations of the grating patternintensity.

[0157] Although the effective voltage for driving the liquid crystalgrating changes stepwise, the intensity distribution of the gratingpattern projected from the liquid crystal grating is an intensitydistribution pattern that changes substantially continuously andlinearly. This is for the reasons of diffraction due to the minuteelectrodes of the liquid crystal grating and the image blurring effectat the edge portion of the grating due to the projection optical system.This improves the surface density of the grating pattern to the extentof a high intensity gradation in a sine wave or the like. However, agrating pattern having a linear intensity distribution is a gratingpattern having the same quality as one with a high number of gradationsand having a substantially continuous and linear intensity distribution,even if the number of gradations is not increased. As a result, evenwith a low number of gradations, such as eight or thereabouts forexample, a highly precise linear intensity distribution can be attained.

[0158] The liquid crystal grating is driven by a linear distributionsignal that generates an effective voltage that sets the liquid crystalgrating with a linear intensity distribution, and a two dimensionalimage of the grating pattern projected onto an object is detected. Atthis time, due to a variety of causes, such as fluctuations in thesurface reflectivity of the object and the detection gain of the CCDcamera for detecting the deformed grating pattern, fluctuations inlighting intensity, fluctuations in drive signal levels, or the like,there are cases where a grating pattern image having a linear intensitydistribution that has been modulated into a non-linear intensitydistribution is detected. This non-linear characteristic occurs inparticular in the vicinity of the maximum intensities and minimumintensities of the intensity distribution. The present invention detectsthe non-linear characteristic of the intensity distribution of thegrating pattern and the position where the non-linear characteristicoccurs, controls the drive effective voltage of the liquid crystalgrating by changing the linear distribution signal according to theextent and position of the non-linear characteristic, and automaticallycorrects it to a linear intensity distribution grating pattern.

[0159] Due to this, prior to actual measurement, a preliminary gratingpattern is projected on the object, and the non-linear characteristic isdetermined from the intensity distribution of a detected preliminarydeformed grating pattern image. In this determination, the image of aspecific partial range within the detected two dimensional image istaken as the subject of the determination, and the existence of anon-linear characteristic in the intensity distribution is determinedfrom fluctuations in a difference intensity which is the difference inimage intensity between previously set pixel step intervals in thatimage region. Where the pitch of the grating pattern is short, theexistence of a non-linear characteristic is determined by fluctuationsin the difference intensity of an adjacent pixel interval. Where thepitch of the grating pattern is S long or where determination of thenon-linear characteristic is simplified, the existence of a non-linearcharacteristic can be determined by a discrete pixel interval differenceintensity.

[0160] Where the intensity distribution in one cycle of the gratingpattern is symmetrical and linear, the absolute value of the differenceintensity within one cycle is constant. Where the intensity distributionis non-linear, the absolute value of the difference intensity within theone cycle fluctuates. At this time, a slice intensity level is providedfor the difference intensity, and the difference intensity and sliceintensity level are compared and determined. If fluctuations of theabsolute value of the difference intensity are present in the sliceintensity level, the absolute value of the difference intensity is takento be substantially constant and intensity distribution is determined tobe a linear intensity distribution. In this case, actual measurement isperformed, fluctuations in the intensity distribution of the deformedgrating pattern image are image processed and the three dimensionalshape is measured.

[0161] Where the fluctuations in the absolute value of the intensitydistribution in one cycle of the grating pattern exceed the sliceintensity level, the intensity distribution is determined as having anon-linear characteristic. There are many cases where the non-linearcharacteristic occurs in the vicinity of the peaks of the maximumintensity and minimum intensity of the intensity distribution. In suchcases, a region of intermediate intensity between the maximum intensityand minimum intensity of the difference intensity exists. The extent ofthe non-linear characteristic is determined from a width where theintermediate intensity occurs. Also, the position where the non-linearcharacteristic occurs is detected from the position where the differenceintensity fluctuates. If an intermediate intensity is generated duringthe period when the difference intensity changes from a maximumintensity to a minimum intensity, it is determined that a non-linearcharacteristic has occurred in the vicinity of the maximum intensity,and if an intermediate intensity is generated during the period when thedifference intensity changes from a minimum intensity to a maximumintensity, it is determined that a non-linear characteristic hasoccurred in the vicinity of the minimum intensity.

[0162] In a case where the intensity distribution is determined to havea non-linear characteristic, it is corrected so that it becomes a linearintensity distribution. The first method of such correction is a methodof changing the voltage and the phase between signals of the lineardistribution signal to change the drive effective voltage of the liquidcrystal grating. where the non-linear characteristic is large, the driveeffective voltage is changed to a larger voltage. Where a non-linearcharacteristic occurs in the vicinity of the maximum intensity of theintensity distribution, the drive effective voltage is controlled sothat it is smaller, and where a non-linear characteristic occurs in thevicinity of the minimum intensity, the drive effective voltage iscontrolled so that it is larger.

[0163] The second method of correcting the intensity distribution is amethod of changing the number of gradations of the linear distributionsignal and changing the effective voltage in accordance with the numberof gradations. For example, where a non-linear characteristic occurs inthe vicinity of the maximum intensity of the intensity distribution, thenumber of gradations is reduced and the drive effective voltage iscontrolled so that it decreases. When the number of gradations has beenreduced, the length of one pitch of the grating pattern shortens. Wherean inconsistency occurs in measurement due to a change in the gratingpitch, adjustment is performed to change the cycle of the lineardistribution signal so that the grating pitch lengthens. In this mannera grating pattern set to a linear intensity distribution is projected atan object, and a linear phase distribution is calculated according tothe intensity distribution to measure a three dimensional shape.

[0164] The third embodiment according to the present invention will beexplained below using FIG. 14. In FIG. 14, an outline of a gratingpattern projection apparatus using a liquid crystal grating is shown. Alight source 301 is constructed from a white light source for lightingsuch as a halogen lamp or the like, and emits a white light onto aliquid crystal grating 311. The liquid crystal grating 311 isconstructed by liquid crystal pixels arranged in a predetermined shape(for example striped shape pixel arrangement), and creates a gratingpattern having an intensity distribution according to a drive effectivevoltage applied to each of the liquid crystal pixels. The gratingpattern created by the liquid crystal grating 311 is projected through aprojecting lens 302 onto the object 300 whose three dimensional shape isto be measured. The intensity distribution in one cycle of the gratingpattern of the present invention is set to a linearly distribution. As aresult, a linear distribution signal for setting the intensitydistribution of the grating pattern to a linear distribution is preparedin the linear distribution signal preparation unit 312, and an effectivevoltage is applied to the liquid crystal grating 311 according to thevoltage and phase of the linear distribution signal.

[0165] Due to the liquid crystal grating 311 being constructed with itspixels separated and independent, it is driven by a discrete signalwhose drive effective voltage changes in a step shape between pixels. Atthis time, the step voltage width and number of liquid crystal pixels towhich this same step voltage is applied are set in accordance with thesize and number of liquid crystal pixels, number of projected gratingpatterns, number of intensity gradations of the linear intensitydistribution, and the like.

[0166] The wave 320 of FIG. 15 is an example of an effective voltage fordriving the liquid crystal grating 311, and the effective voltagechanges symmetrically in a step shape at linear step widths in theinterval L of one cycle. The linear distribution signal that generatesthis effective voltage will be described later. The waveform 320 is anexample of a five gradation signal having five voltage levels betweenthe minimum intensity and the maximum intensity, and the voltage 322takes the light intensity A452 of FIG. 28(a), while the voltage 324similarly takes the light intensity B453.

[0167] The waveform 325 of FIG. 15 is a symmetrical triangular wavesignal, has had its intensity changed to link the central portions ofthe stepped wave of waveform 320, and has intensity increase regions andintensity decrease regions whose widths are equal. when the liquidcrystal grating 311 is driven by the discrete signal 320 whose effectivevoltage changes stepwise and linearly, the actually projected gratingpattern has a distribution in which the intensity changes substantiallycontinuously. This is caused by the occurrence of a light blurringeffect due to diffraction and the like resulting from the grating pitchof the liquid crystal grating 311 being short. Accordingly, even if theliquid crystal grating 311 is driven by a digitized signal 320, if thedrive effective voltage is within the optimum drive voltage range forthe liquid crystal grating 311, a grating pattern having a continuouslinear intensity distribution such as waveform 325 can be attained.

[0168] The grating pattern projected at the object 300 distortsaccording to the surface irregularities of the object. This deformedgrating pattern is detected and stored as a two dimensional image by animage detection portion 304 comprising a CCD, via a projection lens 303in a direction different to the direction that it was projected from. Inthe grating pattern projector of the present invention, setting thegrating pattern to one having a linear intensity distribution is animportant requisite. Measurement errors occur when a grating patternhaving a non-linear intensity distribution is projected. Therefore,before the actual three dimensional shape measurement, the gratingpattern is provisionally projected at the object 300, and whether theintensity distribution of the detected deformed grating pattern image iscorrect and a linear distribution is determined by the intensitydistribution determination portion 314.

[0169] In the determination of the intensity distribution, an imagewithin a specified partial range of the deformed grating pattern imageis subject to determination. A difference intensity which is thedifference of the image intensity between adjacent pixels within thetarget region. Where the grating pitch is long or the determination of anon-linear characteristic is simplified, the difference in imageintensity between a plurality of discrete pixel steps is detected anddetermined.

[0170] In the case of a symmetrical triangular waveform whose intensitydistribution is linear, the absolute value of the difference intensityin that one cycle is constant. Where the size of the absolute value ofthe detected difference intensity is recognized as substantiallyconstant, it is determined to be a linear intensity distribution. Whereit is determined to be a linear intensity distribution, correction ofthe intensity distribution is not executed, and a deformed gratingpattern image is image processed to measure the three dimensional shape.Where the absolute value of the difference intensity fluctuates above aconstant, the intensity distribution is determined to have a non-linearcharacteristic. In the above determination, a slice intensity level isprovided, and it is determined whether the absolute value of thedifference intensity exceeds the slice intensity level. Cases where thenon-linear characteristic of an intensity distribution occur in thevicinity of maximum intensity and minimum intensity peaks are common. Inthis case the absolute value of the difference intensity exists in aregion close to 0. Thus, the extent of the non-linear characteristic isdetermined from the size of the intermediate intensity level of thedifference intensity and the width where the intermediate intensityexists. Also, the position at which a nonlinear characteristic occurs isdetermined from the position at which the difference intensityfluctuates.

[0171] Where it is determined that the intensity distribution has anon-linear characteristic, it is corrected to a linear intensitydistribution. This correction is executed by changing the lineardistribution signal in the linear distribution signal correctingportion. Correction is executed in a feedback manner by determining thesize of the correction according to the extent of the non-linearcharacteristic and the position at which the non-linear characteristicoccurs. A first method for executing correction of the intensitydistribution is a method of changing the drive effective voltage appliedto the liquid crystal grating 311. In the first method, the voltagelevel of the linear distribution signal and phase of the signal arechanged. If a non-linear characteristic occurs in a maximum intensityregion of the intensity distribution, correction is performed to reducethe drive effective voltage. If a non-linear characteristic occurs in aminimum intensity region of the intensity distribution, correction isperformed to increase the drive effective voltage.

[0172] A second method for executing correction of the intensitydistribution is a method of changing the number of gradations of thedrive effective voltage applied to the liquid crystal grating 311. Forexample, if a non-linear characteristic occurs in a maximum intensityregion of the intensity distribution, correction is performed to reducethe number of gradations and reduce the drive effective voltage. Thegrating pattern corrected to a linear intensity distribution by theabove controls is projected at the object 300 and a deformed gratingpattern image detected. The basic shape of the intensity distribution ofthe deformed grating pattern is a linear intensity distributionaccording to the projected grating pattern. The deformed grating patternimage is image processed and a phase distribution that changes linearlyis calculated according to the intensity distribution in the linearphase distribution calculations portion 316 to measure the threedimensional shape of the object.

[0173] The electrode structure of the liquid crystal grating 311 in thepresent embodiment is the same as the structure explained by FIG. 7 withregard to the first embodiment. Also, when preparing a grating patternwith a linear intensity distribution, the example of the drive signalapplied liquid crystal grating 311 is the same as the explanatorystructure of FIG. 8 relating to the first embodiment.

[0174] When preparing a linear intensity distribution, if the intensitygradation in one cycle of the grating pattern is n, and the same voltageis applied to an m number of stripe electrodes per each intensitygradation, the number of grating patterns is N/(n×m). The presentinvention has the characteristic that, as it is set to linear intensitydistribution, even if the number of gradations n is not increased, thesame effects are attained as that for a high gradation. As a result, byreducing the number of electrodes m to which the same effective voltageis applied, the number of grating patterns can be increased, and highprecision measurement is possible.

[0175]FIG. 16 shows an example of the intensity distribution of agrating pattern prepared by an effective voltage set to a linearintensity distribution. The waveform 331 of FIG. 16 is a signal thatchanges stepwise while the effective voltage is between Va and Vb, andis attained by a linear distribution signal. The waveform 332 of FIG. 17is a transmitted light intensity characteristic with respect to a driveeffective voltage of the liquid crystal elements. The line 334 is a loweffective voltage V1 and the line 335 is a high effective voltage V2drive. If the liquid crystal grating 331 is driven within the effectivevoltage range of V1 and V2, the transmitted light intensity changeslinearly. Consequently, the effective voltages Va and Vb must be betweenV1 and V2.

[0176] The waveform 336 of FIG. 18 is an example of a linear intensitydistribution, and waveform 337 is an example of an intensitydistribution having a non-linear characteristic. If the effectivevoltage range (Va to Vb) of the waveform 331 is within the linearvoltage range (V1 to V2) of the liquid crystal grating 311, a linearintensity distribution such as that of waveform 336 can be attained.However, even if the effective voltage of the waveform 331 changeslinearly, if the voltage range thereof shifts from the linear voltagerange of the liquid crystal grating 311, it becomes an intensitydistribution having a non-linear characteristic as in the waveform 337.Where, in the waveform 337, the effective voltage value Vb shifts in adirection higher than V2, the intensity in the region 338 in thevicinity of the peak intensity saturates and changes so that it has anon-linear characteristic. in the region 339 lower than the peakintensity, linear intensity distribution is maintained. The presentinvention corrects an intensity distribution having a non-linearcharacteristic as in the waveform 337 to the linear intensitydistribution of waveform 336.

[0177] In FIG. 19 an example of determination of the intensitydistribution of a grating pattern is shown. In the determination of theintensity distribution, whether the intensity distribution has anon-linear characteristic or not is determined from fluctuations in adifference intensity, using the difference intensity between specificpixels in the deformed grating pattern image detected by the imagedetection portion 313. FIG. 19(a) is a determination example of a casewhere the intensity distribution is linear. The waveform 341 is thewaveform of a linear intensity distribution, and waveform 342 is thewaveform of a difference intensity. The maximum intensity of thedifference intensity is Sp, the minimum intensity is −Sp, and theabsolute values are each Sp. In the case of the linear intensitydistribution (waveform 341), the absolute value of the differenceintensity in the interval L of one cycle is constant. Because there isno fluctuation in the difference intensity, in this case it isdetermined that it is a linear intensity distribution. Consequently,correction of the intensity distribution is not performed.

[0178]FIG. 19(b) is a case where intensity distribution has a non-linearcharacteristic. The waveform 343 has a non-linear characteristic in thevicinity of the maximum intensity, and the intensity changes to linearin the other regions. The waveform 344 is a difference intensitywaveform, and the absolute value of the difference intensity in theregion of the waveform 343 where the intensity distribution changeslinearly is Sp. However, in the region 345 corresponding to the vicinityof the maximum intensity of waveform 343, the difference intensityfluctuates and there is a region where the intensity distributionapproaches 0. The smaller the rate of intensity change becomes in thevicinity of the maximum intensity, the closer the value of thedifference intensity comes to 0. Line 346 and line 347 of waveform 344are slice intensity levels (absolute value of Ss) that determinefluctuations of the difference intensity. Detected fluctuations of thedifference intensity are compared with the slice intensity levels, andwhere the difference intensity exceeding the set slice intensity levelfluctuates, it is determined that the intensity distribution has anon-linear characteristic.

[0179] By means of the above determination method, the position where anon-linear characteristic occurs can be determined from the positionwhere the difference intensity fluctuates. In the case of the waveform343, if a difference intensity close to 0 occurs in the interval duringwhich the difference intensity changes from a maximum value to a minimumvalue, it is determined that a non-linear characteristic has occurred inthe vicinity of the maximum intensity. If a difference intensity closeto 0 occurs in the interval during which the difference intensitychanges from a minimum value to a maximum value, it is determined that anon-linear characteristic has occurred in the vicinity of the minimumintensity. Further, the extent of the non-linear characteristic isdetermined by the size of the width at which the absolute value of thedifference intensity is substantially close to 0. The abovedetermination of the position and size of the non-linear characteristicis effective when correcting the intensity distribution.

[0180]FIG. 20 and FIG. 21 show a method when correcting an intensitydistribution having a non-linear characteristic to a linear intensitydistribution. FIG. 20 is the light transmission characteristic withrespect to the liquid crystal drive voltage, as shown in FIG. 17. Ifdriven at the high voltage range 351 between the effective voltages V1and V2 indicated by the two solid lines, the signal becomes saturated inthe region where the intensity is high, as in the waveform 343 of FIG.19(b). At this time, the effective voltage is corrected so that itbecomes lower. Thus, the drive voltage shifts to the voltage range 352between the effective voltages V3 and V4 indicated by the dotted lines.In this voltage range 352 saturation of the light intensity does notoccur and the intensity distribution can be corrected to linear.

[0181] Alternatively, if the intensity distribution in the vicinity ofthe minimum intensity of the waveform 343 of FIG. 19(b) has a non-linearcharacteristic, this is a case where the drive effective voltage of theliquid crystal grating 311 is low. In this case, driving at an effectivevoltage lower than the optimum voltage range 352 is shifted to a voltagerange so that it drives at a high effective voltage.

[0182] In correcting the intensity distribution by shifting the driveeffective voltage as above, the effective voltage is changed by changingthe voltage levels V of the rectangular shaped linear distributionsignals 181, 182 and 183 shown in FIG. 8. Also, the voltage V of thelinear distribution signal is kept constant and the phases of the drivesignals 182 and 183 applied to the stripe electrode can be changed withrespect to the standard voltage 181 applied to the common electrode, tochange the effective voltage. The above control of the effective voltageis performed according to the extent of the non-linear characteristic,if the non-linear characteristic is small, the change to the effectivevoltage is small, and if the non-linear characteristic is large, thechange to the effective voltage is large. Also, the direction in whichthe effective voltage is changed according to the position where thenon-linear characteristic occurs. The above correction is preferablyfeedback correction executed by repeating the determination andcorrection a number of times.

[0183] A second example of correcting the drive effective voltage isshown in FIG. 21. The waveform 353 of FIG. 21 shows an intensitygradation of the effective voltage applied to the liquid crystal grating311. The waveform 353 has a minimum intensity Va, a maximum intensityVb, and seven gradations. As in the waveform 343 of FIG. 19(b), wherethere is a non-linear characteristic in the region where the intensityis high, the number of gradations can be decreased and the driveeffective voltage reduced. The waveform 354 indicates an intensitygradation having a new effective voltage that corrects the intensitydistribution. The waveform 354 changes the minimum intensity sets themaximum intensity from Va to Vc, and changes the number of gradations to5. By reducing the number of gradations in the region where theeffective voltage is high, the effective voltage can be lowered and theintensity distribution corrected to linear. The example shown in FIG. 21is effective where the drive effective voltage is higher than theoptimum voltage range.

[0184] If the number of gradations is reduced, the interval of one cycleof the grating pattern is shortened. If there is no effect on themeasurement even when the pitch of the grating pattern is shortened,measurement is performed with the sort pitch after correction. If thegrating pitch is shortened and a fault occurs, the number of stripeelectrodes to which a voltage of the same gradation is applied can beincreased and the pitch can be simultaneously corrected so that thegrating pitch is substantially the same as the waveform 353. Forexample, if a fault occurs in the measurement of large irregularitiesdue to two adjacent electrodes among the stripe electrodes 170 of FIG. 7being driven by the same voltage, the grating pitch can be lengthened bydriving four adjacent electrodes with the same voltage.

[0185]FIG. 22 shows a flow chart for when the intensity distribution isdetermined and corrected. Step 360, when preparing a linear distributionsignal, sets conditions such as number of gradations and pitch of thegrating pattern, the drive effective voltage, and the like, prepares alinear distribution signal by modulating a phase difference betweenrectangular waveform signals as shown in FIG. 8, and drives the liquidcrystal grating 311. Step 361 is a preliminary projection of the gratingpattern, and is a projection performed to determine whether theintensity distribution of the grating pattern projected at the object isan optimum linear distribution. The intensity distribution of thegrating pattern is a distribution according to the effective voltage ofthe linear distribution signal set in step 360, the surface reflectivityof the object, the brightness of the lighting source, and the like.

[0186] Step 362 detects the two dimensional image of the gratingpattern, and stores the image detected by the CCD camera or the like.Step 363 sets the range where determination of the intensitydistribution of the image is performed, and extracts a partial range ofthe two dimensional image detected in step 362. By making only a partialrange the target for determination, image processing is simplified. Step364 is detection of the difference intensity, and detects a differenceintensity which is the difference in image intensity between adjacentpixels within the set image range. The difference intensity indicatesthe rate of intensity change of an image and used in determiningnon-linear characteristics of intensity distributions.

[0187] Step 365 is the setting of slice intensity levels with respect tothe difference intensity, makes a specific intensity between the maximumvalue and the minimum value of the difference intensity a sliceintensity level, and uses it to determine the size of a fluctuation andthe position of a fluctuation of the difference intensity. Step 366 is aintensity distribution determination, and performs determination ofwhether the intensity distribution of a grating pattern has a non-linearcharacteristic. In step 366, the fluctuation of the absolute value ofthe difference intensity detected in step 364 and the absolute value ofthe slice intensity level set in step 365 are compared. If thefluctuation of the absolute value of the difference intensity is lessthan the absolute value of the slice intensity level, the intensitydistribution is determined as not having a non-linear characteristic,correction of the intensity distribution is not performed, and theintensity distribution correction routine is finished.

[0188] In the intensity distribution determination of step 366, if thefluctuation of the absolute value of the difference intensity exceedsthe absolute value of the slice intensity level, it is determined thatthe intensity distribution has a non-linear characteristic. At thistime, the extent of the non-linear characteristic is determined from thesize of the fluctuation of the absolute value of the differenceintensity, and the position at which the non-linear characteristicoccurs is determined from the position where the difference intensityfluctuates. Step 367 is a change to the linear distribution signal, andchanges the linear distribution signal set in step 360 according to thenon-linear characteristic detected in step 366 and the position wherethe non-linear characteristic occurs. The value of the new effectivevoltage based on the changed linear distribution signal is applied tothe liquid crystal grating 311. Thereafter, the operation is repeatedlyexecuted from step 362. If the intensity distribution becomes linear byway of repeated correction, the correction routine is finished.

[0189] Next, the operation of projecting the grating pattern correctedto a linear intensity distribution at the object, and calculating thephase distribution from the intensity distribution of the deformedgrating pattern image will be explained.

[0190]FIG. 23(a) is a case where a single phase triangular waveformgrating pattern is projected. The waveform 370 is the intensitydistribution of a projected grating pattern, and waveform 372 is thewaveform of a phase distribution attained by image processing. Themaximum intensity (Pm) and minimum intensity (Pn) of each cycle of thegrating pattern waveform 370 having a linear intensity distribution aredetected and stored. The phase distribution of the waveform 372 is theconversion of the intensities of each of the positions in the waveform370 to linear phase distributions, with the peak intensities Pm and Pnin the interval L of one cycle of the waveform 370 as standards. Sincethe intensity distribution is a linear distribution, the phasedistribution is calculated by simple proportional processing.

[0191]FIG. 23(b) is a case where a dual phase linear grating patternwhose intensity distributions are reversed is projected onto an object.Waveforms 374 and 376 show the intensity distributions of a projectedgrating pattern. The intensity distributions of the waveforms 374 and376 are mutually inverse. In the case of a dual phase grating pattern,because the intensity sum at each position is constant, this iseffective in cases where, for example, the surface reflectivity of theobject fluctuates. If the reflectivity is constant the intensity sum isconstant, and if the reflectivity fluctuates the intensity sum alsofluctuates, therefore fluctuations in the reflectivity can be detectedfrom fluctuations in the intensity sum. FIG. 23(b) is an example of acase where the intensity sum is constant and the reflectivity isconstant. The waveform 378 is the same intensity distribution as thewaveform 372 previously described. The intensity distribution of thewaveform 378 is the intensities of each of the positions of the waveform376 converted to a linear phase distribution, with the peak intensitiesPm and Pn of th waveform 376, for example, as standards.

[0192] As is clear from the above explanation, the present inventioncreates a grating pattern having a linear intensity distribution,determines the intensity distribution of the grating pattern projectedat an object, and automatically corrects it to a linear intensitydistribution if there are non-linear characteristics. A differenceintensity is used in the determination of intensity distribution, thesize of a non-linear characteristic and the position where thenon-linear characteristic occurs are detected from the size of afluctuation of the difference intensity and the position of thefluctuation. The drive effective voltage of the liquid crystal gratingis changed to correct the intensity distribution, according to theextent and position where the non-linear characteristic occurs.

1. (deleted)
 2. (deleted)
 3. (amended) A grating pattern projection apparatus, comprising: a light source; a liquid crystal grating; a projector for projecting a grating pattern formed by light emitted from the light source passing through the liquid crystal grating onto an object to be measured; a liquid crystal driver for driving the liquid crystal grating so that one cycle of the grating pattern has a linear intensity distribution, the liquid crystal driver prepares a triangular wave intensity distribution that a width of an area whose intensity increases linearly and a width of an area whose intensity decreases linearly are equal in one cycle of the grating pattern, and drives the liquid crystal grating so that the grating pattern has a triangular wave intensity distribution; a detector for detecting a deformed grating pattern deformed by projecting the grating pattern onto an object to be measured; and a processor for converting the linear intensity distribution of each cycle of the deformed grating pattern into a linear phase distribution for changing a phase linearly.
 4. (Deleted)
 5. (Amended) The grating pattern projection apparatus of claim 3, wherein the processor detects a maximum intensity or a minimum intensity of each cycle of the deformed grating pattern, converts the intensity at each position of the deformed grating pattern into a standardized intensity with the maximum intensity or the minimum intensity as a standard, and performs proportional processing of the standardized intensity to convert an intensity that changes linearly in one cycle of the deformed grating pattern into a phase that changes linearly between 0 and 2π, and further comprises a smoothing processor for converting an intensity of the deformed grating pattern into an intensity distribution that changes smoothly, and a linear distribution corrector for correcting intensity changes in each intensity increase area and intensity decrease area of the smoothing processed deformed grating pattern into an intensity distribution that approximates a straight line, so that it changes linearly.
 6. (Amended) A grating pattern projection apparatus, comprising: a light source; a liquid crystal grating; a projector for projecting a grating pattern formed by light emitted from the light source passing through the liquid crystal grating onto an object to be measured; a liquid crystal driver for driving the liquid crystal grating so that one cycle of the grating pattern has a linear intensity distribution; a detector for detecting a deformed grating pattern deformed by projecting the grating pattern onto an object to be measured; and a processor for converting the linear intensity distribution of each cycle of the deformed grating pattern into a linear phase distribution for changing a phase linearly, wherein the grating pattern includes a first grating pattern and a second grating pattern of the same grating pitch and whose intensity distributions are mutually inverse, the projector sequentially projects the first grating pattern and the second grating pattern individually onto an object to be measured, the detector sequentially detects a first deformed grating pattern caused by the first grating pattern and a second deformed grating pattern caused by the second grating pattern, and the processor: determines whether there is a fluctuation in a reflection state of an object to be measured by detecting changes in a maximum intensity and a minimum intensity of each cycle of the first deformed grating pattern and the second deformed grating pattern, and either one of positions where an intensity of the first and the second deformed grating pattern change discontinuously, or positions where the intensity sum of each position of the first and second deformed grating pattern changes discontinuously; and converts linear intensity distributions of the first and the second deformed grating pattern to linear phase distributions when the processor determines that the reflection state does not fluctuate, and when the processor determines that the reflection state does fluctuate, the processor: converts the intensity distributions within a range where the reflection state fluctuates in the linear intensity distributions of the first and the second deformed grating pattern to a first linear phase distribution for changing a phases linearly; converts the intensity distributions within a range where the reflection state does not fluctuate in the linear intensity distributions of the first deformed grating pattern and second deformed grating pattern to a second linear phase distribution for changing a phases linearly; and obtains a linear phase distribution by smoothly connecting the first phase distribution and the second phase distribution at positions where the intensity distributions of the first deformed grating pattern and second deformed grating pattern change discontinuously or positions where the intensity sum of the first and the second deformed grating patterns changes discontinuously.
 7. The grating pattern projection apparatus of claim 6, wherein the first grating pattern and the second grating pattern are triangular wave intensity distributions in each single cycle of the grating pattern, in which the width of an area whose intensity increases linearly and the width of an area whose intensity decreases linearly are equal.
 8. The grating pattern projection apparatus of claim 6, wherein the processor converts the intensity distributions of the first deformed grating pattern and the second deformed grating pattern into intensity distributions that change smoothly, and corrects the respective intensity distributions of smoothing processed first and second deformed grating patterns to intensity distributions wherein the intensity changes of intensity increase areas and intensity decrease areas approximate straight lines, so that they change linearly.
 9. (Amended) A grating pattern projection apparatus, comprising: a light source; a liquid crystal grating; a projector for projecting a grating pattern formed by light emitted from the light source passing through the liquid crystal grating onto an object to be measured; a liquid crystal driver for driving the liquid crystal grating so that one cycle of the grating pattern has a linear intensity distribution; a detector for detecting a deformed grating pattern deformed by projecting the grating pattern onto an object to be measured; and a processor for converting the linear intensity distribution of each cycle of the deformed grating pattern into a linear phase distribution for changing a phase linearly, wherein the grating pattern includes a first grating pattern and a second grating pattern of the same grating pitch and whose intensity distributions are mutually inverse, the projector projects any one of the first grating pattern or the second grating pattern onto an object to be measured when the surface of an object to be measured is formed from a material of uniform reflectivity, and sequentially projects the first grating pattern and the second grating pattern onto the object to be measured when the surface of the object to be measured is formed from a material of a plurality of reflectivities, and the detector sequentially detects the first deformed grating pattern caused by the first grating pattern and the second deformed grating pattern caused by the second grating pattern.
 10. (Deleted)
 11. (Amended) A grating pattern projection apparatus, comprising: a light source; a liquid crystal grating; a projector for projecting a grating pattern formed by light emitted from the light source passing through the liquid crystal grating onto an object to be measured; a liquid crystal driver for driving the liquid crystal grating so that one cycle of the grating pattern has a linear intensity distribution; a detector for detecting a deformed grating pattern deformed by projecting the grating pattern onto an object to be measured; and a processor for converting the linear intensity distribution of each cycle of the deformed grating pattern into a linear phase distribution for changing a phase linearly, wherein the grating pattern is a pattern of one phase only, the projector projects a single phase grating pattern onto an object to be measured one time only, the detector detects a single phase deformed grating pattern caused by the single phase grating pattern one time only, and the processor has a single phase signal intensity fluctuation detector for detecting a peak intensity of each cycle of the single phase grating pattern, the peak intensity position, and the rate of intensity change, and a phase distribution calculator for converting the single phase deformed grating pattern to a linear phase distribution according to fluctuation of the peak intensity and rate of intensity change.
 12. The grating pattern projection apparatus of claim 11, wherein the liquid crystal driver drives the liquid crystal grating so that the grating pattern has a triangular wave intensity distribution, by preparing a triangular wave intensity distribution wherein, in one cycle of the grating pattern, the width of an area whose intensity increases linearly and the width of an area whose intensity decreases linearly are equal.
 13. The grating pattern projection apparatus of claim 11, wherein the liquid crystal driver drives the liquid crystal grating by means of a signal whose voltage in one cycle is a discrete stepped shape and changes to symmetrical at half cycles, according to the number of gradations representing the fineness of intensity changes of linear intensity distribution.
 14. The grating pattern projection apparatus of claim 11, wherein the single phase signal intensity fluctuation detector, when the peak intensity in each cycle of the single phase deformed grating pattern is constant, obtains a linear phase distribution from a rate of intensity change where the reflectivity of an object to be measured is determined to be constant and, when the peak intensity fluctuates, obtains a linear phase distribution from a peak intensity and rate of intensity change where the reflectivity of an object to be measured is determined to be fluctuating in the vicinity of positions where the peak intensity fluctuates.
 15. The grating pattern projection apparatus of claim 11, wherein the single phase signal intensity fluctuation detector: detects a rate of intensity change from a difference value of a pixel intensity of a previously set step pixel interval in one cycle of the single phase deformed grating pattern; sets a slice intensity level for categorizing the rate of intensity change into discrete segments when the rate of intensity change in one cycle fluctuates; compares the slice intensity level and rate of intensity change and sorts the rate of intensity change into areas according to the slice intensity level; and detects the boundary positions of the areas.
 16. The grating pattern projection apparatus of claim 11, wherein the linear phase distribution calculator, when the rate of intensity change in one cycle of the single phase deformed grating pattern is detected as constant by the single phase signal intensity fluctuation detector, standardizes a phase difference between maximum intensities or minimum intensities in one cycle of the single phase deformed grating pattern to 2π, and converts each pixel position from a proportional relationship between a standard pixel number between maximum intensities or minimum intensities and each pixel position in one cycle to a phase from 0 to 2π, to obtain the linear phase distribution that changes linearly at the constant gradient in one cycle.
 17. The grating pattern projection apparatus of claim 11, wherein the linear phase distribution calculator, when the rate of intensity change in one cycle of a single phase deformed grating pattern is detected as fluctuating by the single phase signal intensity fluctuation detector, standardizes a phase difference between maximum intensities or minimum intensities in one cycle of the single phase deformed grating pattern to 2π, converts each pixel position within an area according to a proportional relationship between a standard pixel number between maximum intensities or minimum intensities and each pixel position within the area, as well as a slice intensity level of the area, to a phase from 0 to 2π, and connects phases of each area at boundary positions of each area, to obtain the linear phase distribution that changes linearly at a constant gradient in one cycle.
 18. (Amended) A grating pattern projection apparatus, comprising: a light source; a liquid crystal grating; a projector for projecting a grating pattern formed by light emitted from the light source passing through the liquid crystal grating onto an object to be measured; a liquid crystal driver for driving the liquid crystal grating so that one cycle of the grating pattern has a linear intensity distribution; a detector for detecting a deformed grating pattern deformed by projecting the grating pattern onto an object to be measured; and a processor for converting the linear intensity distribution of each cycle of the deformed grating pattern into a linear phase distribution for changing a phase linearly, wherein the liquid crystal driver drives the liquid crystal grating by means of a preliminary linear intensity distribution signal; the projector projects a preliminary grating pattern onto an object to be measured according to the preliminary linear intensity distribution signal; the detector detects a preliminary deformed grating pattern deformed by projecting the preliminary grating pattern onto an object to be measured, and the liquid crystal driver further comprises, an intensity distribution judgment unit for detecting a non-linear characteristic of the preliminary deformed grating pattern and positions having a non-linear characteristic, and a linear distribution signal corrector for, when a non-linear characteristic of the preliminary deformed grating pattern is detected, correcting the preliminary linear intensity distribution signal so that the preliminary deformed grating pattern does not have a non-linear characteristic, and wherein the liquid crystal driver uses a corrected preliminary linear intensity distribution signal to drive the liquid crystal grating for measuring.
 19. The grating pattern projection apparatus of claim 18, wherein the intensity distribution judgment unit: detects a difference intensity between previously set step pixels with respect to one image area of the preliminary deformed grating pattern; determines that the preliminary deformed grating pattern does not have a non-linear characteristic in a case where an absolute value of a difference intensity in one cycle of the preliminary deformed grating pattern is regarded as substantially constant; determines that the preliminary deformed grating pattern has a non-linear characteristic in a case where the absolute value of a difference intensity in one cycle of the preliminary deformed grating pattern fluctuates over a previously set limit; determines that a nonlinear characteristic has occurred in the vicinity of the maximum intensity of the preliminary deformed grating pattern in a case where a difference intensity close to 0 occurs in the vicinity where the difference intensity in one cycle of th preliminary deformed grating pattern changes from a maximum value to a minimum value; and determines that a nonlinear characteristic has occurred in the vicinity of the minimum intensity of the preliminary deformed grating pattern in a case where a difference intensity close to 0 occurs in the vicinity where the difference intensity in one cycle of the preliminary deformed grating pattern changes from a minimum value to a maximum value.
 20. The grating pattern projection apparatus of claim 19, wherein the linear distribution signal corrector: changes the voltage level of the preliminary linear intensity distribution signal and phases between signals to control a driving effective voltage of the liquid crystal grating, according to the extent of a non-linear characteristic of a preliminary deformed grating pattern determined by the intensity distribution judgment portion and positions where the non-linear characteristic occurs; performs control to reduce the drive effective voltage of the liquid crystal grating in a case where a non-linear characteristic is determined by the intensity distribution judgment unit to have occurred in a maximum intensity area of the preliminary deformed grating pattern; and performs control to increase the drive effective voltage in a case where a non-linear characteristic is determined by the intensity distribution judgment unit to have occurred in a minimum intensity area of the preliminary deformed grating pattern.
 21. The grating pattern projection apparatus of claim 19, wherein the linear distribution signal corrector: changes the number of gradations of the preliminary linear intensity distribution signal and phases between signals so as to control a driving effective voltage of the liquid crystal grating according to the extent of a non-linear characteristic of a preliminary deformed grating pattern determined by the intensity distribution judgment unit and positions where the non-linear characteristic occurs; and reduces the number of gradations where a non-linear characteristic is determined, by the intensity distribution judgment unit, to have occurred in a maximum intensity area of the preliminary deformed grating pattern. 